Show Discord integration to Ultra subscribers; rename role to "Ultra"#385
Merged
Conversation
Widens the Discord role gate from `hasMaxAccess()` to also include `hasUltraAccess()` so Ultra subscribers see the integration banner and can claim the role. Renames the role end-to-end (config key, env var, DiscordApi methods, jobs, Livewire state, user-facing copy) from "Max" to "Ultra" to match the new branding. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # app/Http/Controllers/DiscordIntegrationController.php # app/Livewire/DiscordAccessBanner.php # app/Support/DiscordApi.php # config/services.php # resources/views/livewire/customer/integrations.blade.php # resources/views/livewire/discord-access-banner.blade.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hasMaxAccess(), which only covers perpetual Max licenses. Ultra subscribers (hasUltraAccess()) couldn't see or claim the role even though they qualify. This widens the gate across all five sites involved in the role lifecycle: the integrations page, the OAuth callback,AssignDiscordUltraRoleJob, therequestUltraRole()Livewire action, thediscord:remove-expired-rolescommand, and the Stripe cancellation cleanup inStripeWebhookReceivedListener.services.discord.max_role_id→ultra_role_id), env var (DISCORD_MAX_ROLE_ID→DISCORD_ULTRA_ROLE_ID),DiscordApimethods (assignMaxRole/removeMaxRole/hasMaxRole→…UltraRole), job class names, Livewire state and action, and all user-facing copy. The Discord role ID itself doesn't change — only the variable name and the role's display name (to be renamed in Discord manually).tests/Feature/DiscordUltraAccessTest.phpcovering banner visibility, role request happy/rejection paths, and the cleanup command's retain/remove behavior under the new rule.Deployment note
The env var
DISCORD_MAX_ROLE_IDmust be renamed toDISCORD_ULTRA_ROLE_IDin any staging/production environment that has it set. The Discord role's display name should also be updated in the Discord server.Test plan
php artisan test --compact tests/Feature/DiscordUltraAccessTest.php— 6 passedphp artisan test --compact tests/Feature/StripeWebhookRouteTest.php— 2 passedvendor/bin/pint --dirty --format agent— clean🤖 Generated with Claude Code