Skip to content

Do not show cloud user when federated login is enabled#1643

Merged
alexandrudanpop merged 2 commits intomainfrom
feat/cloud-user
Nov 20, 2025
Merged

Do not show cloud user when federated login is enabled#1643
alexandrudanpop merged 2 commits intomainfrom
feat/cloud-user

Conversation

@alexandrudanpop
Copy link
Copy Markdown
Contributor

Fixes OPS-2985

Cloud templates are still accessible if login with federated user.

@linear
Copy link
Copy Markdown

linear Bot commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The || false is redundant since the expression already evaluates to a boolean. The result of !cloudConnectionPageEnabled || federatedLoginEnabled is always boolean.

Suggested change
return !cloudConnectionPageEnabled || federatedLoginEnabled || false;
return !cloudConnectionPageEnabled || federatedLoginEnabled;

Copilot uses AI. Check for mistakes.
@alexandrudanpop alexandrudanpop changed the title Don't show cloud user when federated login is enabled Do not show cloud user when federated login is enabled Nov 20, 2025
@sonarqubecloud
Copy link
Copy Markdown

@alexandrudanpop alexandrudanpop merged commit 9e24d6b into main Nov 20, 2025
22 checks passed
@alexandrudanpop alexandrudanpop deleted the feat/cloud-user branch November 20, 2025 11:51
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.

3 participants