Skip to content

Commit

Permalink
fix featurehiding (#45608)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudream authored Aug 19, 2024
1 parent 5106fa5 commit 9449cfd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
28 changes: 15 additions & 13 deletions web/packages/teleport/src/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,21 @@ export function TopBar({ CustomLogo }: TopBarProps) {
Icon={Server}
/>
)}
<MainNavItem
name="Access Management"
to={
previousManagementRoute ||
getFirstRouteForCategory(
features,
NavigationCategory.Management
)
}
size={iconSize}
isSelected={managementTabSelected}
Icon={SlidersVertical}
/>
{ctx.getFeatureFlags().managementSection && (
<MainNavItem
name="Access Management"
to={
previousManagementRoute ||
getFirstRouteForCategory(
features,
NavigationCategory.Management
)
}
size={iconSize}
isSelected={managementTabSelected}
Icon={SlidersVertical}
/>
)}

{topBarLinks.map(({ topMenuItem, navigationItem }) => {
const link = navigationItem.getLink(clusterId);
Expand Down
7 changes: 6 additions & 1 deletion web/packages/teleport/src/teleportContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ class TeleportContext implements types.Context {
userContext.getIntegrationsAccess().list ||
userContext.hasDiscoverAccess() ||
userContext.getDeviceTrustAccess().list ||
userContext.getLockAccess().list
userContext.getLockAccess().list ||
userContext.getAccessListAccess().list ||
userContext.getAccessGraphAccess().list ||
hasAccessMonitoringAccess() ||
userContext.getTokenAccess().create ||
userContext.getBotsAccess().list
);
}

Expand Down

0 comments on commit 9449cfd

Please sign in to comment.