Skip to content

fix(RHCLOUD-48491): Show unauthorized state for users without read permissions - #4

Closed
aferd wants to merge 1 commit into
masterfrom
RHCLOUD-48491
Closed

fix(RHCLOUD-48491): Show unauthorized state for users without read permissions#4
aferd wants to merge 1 commit into
masterfrom
RHCLOUD-48491

Conversation

@aferd

@aferd aferd commented Jun 29, 2026

Copy link
Copy Markdown
Owner

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:read permissions:

  • The IntegrationsList component only checked canWriteIntegrationsEndpoints
  • It did not check canReadIntegrationsEndpoints before rendering
  • The integrations API query would run and fail/hang for unauthorized users
  • Users would see infinite spinners instead of an informative empty state

Solution

  1. Added canReadIntegrationsEndpoints permission check to List.tsx
  2. Created new UnauthorizedState component that displays:
    • Informative alert explaining permission requirements
    • Link to request access via Virtual Assistant
    • Clear messaging to contact organization administrator
    • Lock icon and empty state pattern matching other unauthorized views
  3. Show UnauthorizedState when user lacks read permissions, preventing the API query from running

Testing

  • Verify non-org admin users without read permissions see UnauthorizedState
  • Verify non-org admin users with read permissions see normal integrations list
  • Verify org admins see full functionality
  • Test on Communications, Reporting & automation, and Webhooks tabs

Files Changed

  • src/pages/Integrations/List/List.tsx - Added permission check and UnauthorizedState rendering
  • src/pages/Integrations/List/UnauthorizedState.tsx - New component for unauthorized users

Related

  • Related to sources-ui handling of integration tabs
  • Ensures parity with Cloud and Red Hat tabs empty state behavior

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>
@aferd

aferd commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

Closing - PR should be opened against upstream RedHatInsights/notifications-frontend

@aferd aferd closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant