Do not show cloud user when federated login is enabled#1643
Do not show cloud user when federated login is enabled#1643alexandrudanpop merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR prevents the cloud user from being displayed in the side menu when federated login is enabled, addressing issue OPS-2985 where cloud templates remained accessible with federated user login.
Key Changes:
- Added a new hook
useShouldShowCloudUserInMenu()to determine when to show cloud user information - Updated
useShouldFetchCloudTemplates()logic to allow template fetching with federated login - Modified side menu footer to conditionally show cloud user based on the new hook
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/react-ui/src/app/common/hooks/flags-hooks.ts | Added useShouldShowCloudUserInMenu() hook and updated useShouldFetchCloudTemplates() to handle federated login scenarios |
| packages/react-ui/src/app/features/navigation/side-menu/side-menu-footer.tsx | Integrated the new hook to conditionally display cloud user information and cloud login option in the menu |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Fetch cloud templates when cloud connection page is disabled | ||
| // OR when federated login is enabled | ||
| return !cloudConnectionPageEnabled || federatedLoginEnabled || false; |
There was a problem hiding this comment.
The || false is redundant since the expression already evaluates to a boolean. The result of !cloudConnectionPageEnabled || federatedLoginEnabled is always boolean.
| return !cloudConnectionPageEnabled || federatedLoginEnabled || false; | |
| return !cloudConnectionPageEnabled || federatedLoginEnabled; |
|



Fixes OPS-2985
Cloud templates are still accessible if login with federated user.