feat(platform): hide subscription banners for non-admin users#3148
Open
feat(platform): hide subscription banners for non-admin users#3148
Conversation
JIRA: AAPRFE-2823 https://issues.redhat.com/browse/AAPRFE-2823 Non-admin users cannot act on subscription compliance issues, so displaying the banner to them causes confusion and unnecessary support burden. This change hides all subscription-related banners (compliance, grace period, expiry warnings) for non-superuser accounts. - Add is_superuser check to subscriptionBanner useMemo - Add 3 new test cases covering admin/non-admin scenarios - All existing tests continue to pass (default mock is superuser) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove AAPRFE-2823 references from comments and test names per reviewer feedback - upstream repo should not contain internal tracker links. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7 tasks
|
Member
|
/run-playwright |
Collaborator
marshmalien
approved these changes
Apr 30, 2026
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
Hide the "out of compliance" banner for non-admin users.
Non-admin users cannot act on subscription compliance issues, so displaying the banner to them:
This change hides all subscription-related banners (compliance, grace period, expiry warnings) for non-superuser accounts.
Risk Analysis - REQUIRED
Justification:
usePlatformActiveUserhook (already in use elsewhere)Changes Made
platform/main/PlatformApp.tsx: Addis_superusercheck tosubscriptionBanneruseMemoplatform/main/PlatformApp.test.tsx: Add 3 new test cases covering admin/non-admin scenariosImplementation Details
Uses existing pattern from
SubscriptionDetails.tsx:Test Plan
Manual Testing Steps
🤖 Generated with Claude Code