fix(RHCLOUD-48491): Show unauthorized state for users without read permissions - #4
Closed
aferd wants to merge 1 commit into
Closed
fix(RHCLOUD-48491): Show unauthorized state for users without read permissions#4aferd wants to merge 1 commit into
aferd wants to merge 1 commit into
Conversation
For non-org admin users without integrations read permissions, the Communications, Reporting, and Webhooks tabs were showing infinite spinners instead of a proper empty state. This fix: - Checks canReadIntegrationsEndpoints before rendering the integrations list - Shows an UnauthorizedState component with clear messaging when users lack read permissions - Prevents the integrations API query from running for unauthorized users The UnauthorizedState component displays: - An informative alert explaining permission requirements - A link to request access via the Virtual Assistant - Clear messaging to contact the organization administrator This ensures non-org admin users see a proper empty state similar to the Cloud and Red Hat tabs, instead of an indefinite loading spinner. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
Author
|
Closing - PR should be opened against upstream RedHatInsights/notifications-frontend |
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
Fixes RHCLOUD-48491 - Non-org admin users without integrations read permissions were seeing infinite loading spinners on the Communications, Reporting, and Webhooks tabs instead of a proper empty state.
Problem
For non-org admin users without
integrations:endpoints:readpermissions:IntegrationsListcomponent only checkedcanWriteIntegrationsEndpointscanReadIntegrationsEndpointsbefore renderingSolution
canReadIntegrationsEndpointspermission check toList.tsxUnauthorizedStatecomponent that displays:UnauthorizedStatewhen user lacks read permissions, preventing the API query from runningTesting
Files Changed
src/pages/Integrations/List/List.tsx- Added permission check and UnauthorizedState renderingsrc/pages/Integrations/List/UnauthorizedState.tsx- New component for unauthorized usersRelated