Skip to content

Commit

Permalink
Merge pull request #2959 from karelhala/access-management-url
Browse files Browse the repository at this point in the history
Access management url
  • Loading branch information
Hyperkid123 authored Oct 25, 2024
2 parents eb35274 + 719f4f7 commit 75e3a47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Header/Tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ const Tools = () => {
const isPreview = useAtomValue(isPreviewAtom);
const togglePreviewWithCheck = useSetAtom(togglePreviewWithCheckAtom);
const enableIntegrations = useFlag('platform.sources.integrations');
const workspacesEnabled = useFlag('platform.rbac.workspaces');
const enableGlobalLearningResourcesPage = useFlag('platform.learning-resources.global-learning-resources');
const { user, token } = useContext(ChromeAuthContext);
const unreadNotifications = useAtomValue(unreadNotificationsAtom);
const [isNotificationDrawerExpanded, toggleNotifications] = useAtom(notificationDrawerExpandedAtom);
const intl = useIntl();
const isOrgAdmin = user?.identity?.user?.is_org_admin;
const settingsPath = isITLessEnv ? `/settings/my-user-access` : enableIntegrations ? `/settings/integrations` : '/settings/sources';
const identityAndAccessManagmentPath = isOrgAdmin ? '/iam/user-access/overview' : '/iam/my-user-access';
const identityAndAccessManagmentPath = isOrgAdmin
? `/iam/${workspacesEnabled ? 'access-management' : 'user-access'}/overview`
: '/iam/my-user-access';
const betaSwitcherTitle = `${isPreview ? intl.formatMessage(messages.stopUsing) : intl.formatMessage(messages.use)} ${intl.formatMessage(
messages.betaRelease
)}`;
Expand Down Expand Up @@ -114,7 +117,7 @@ const Tools = () => {
items: [
{
url: identityAndAccessManagmentPath,
title: isOrgAdmin ? 'User Access' : 'My User Access',
title: isOrgAdmin ? (workspacesEnabled ? 'Acess management' : 'User Access') : 'My User Access',
},
{
url: '/iam/authentication-policy/authentication-factors',
Expand Down

0 comments on commit 75e3a47

Please sign in to comment.