mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
UI: Exclude 'Manage users' menu item in sandbox mode (#11403)
## Addresses #10819 Exclude the "Manage users" menu option in sandbox mode. - [x] Manual QA for all new/changed functionality Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
parent
1183e47803
commit
59eb2a5566
2 changed files with 5 additions and 1 deletions
|
|
@ -87,6 +87,7 @@ const SiteTopNav = ({
|
|||
isAnyTeamMaintainer,
|
||||
isNoAccess,
|
||||
isMdmEnabledAndConfigured, // TODO: confirm
|
||||
isSandboxMode,
|
||||
} = useContext(AppContext);
|
||||
|
||||
const isActiveDetailPage = isDetailPage(currentPath);
|
||||
|
|
@ -213,6 +214,7 @@ const SiteTopNav = ({
|
|||
currentUser={currentUser}
|
||||
isAnyTeamAdmin={isAnyTeamAdmin}
|
||||
isGlobalAdmin={isGlobalAdmin}
|
||||
isSandboxMode={isSandboxMode}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ interface IUserMenuProps {
|
|||
isAnyTeamAdmin: boolean | undefined;
|
||||
isGlobalAdmin: boolean | undefined;
|
||||
currentUser: IUser;
|
||||
isSandboxMode?: boolean;
|
||||
}
|
||||
|
||||
const UserMenu = ({
|
||||
|
|
@ -25,6 +26,7 @@ const UserMenu = ({
|
|||
isAnyTeamAdmin,
|
||||
isGlobalAdmin,
|
||||
currentUser,
|
||||
isSandboxMode = false,
|
||||
}: IUserMenuProps): JSX.Element => {
|
||||
const accountNavigate = onNavItemClick(PATHS.USER_SETTINGS);
|
||||
const dropdownItems = [
|
||||
|
|
@ -42,7 +44,7 @@ const UserMenu = ({
|
|||
},
|
||||
];
|
||||
|
||||
if (isGlobalAdmin) {
|
||||
if (isGlobalAdmin && !isSandboxMode) {
|
||||
const manageUsersNavigate = onNavItemClick(PATHS.ADMIN_USERS);
|
||||
|
||||
const manageUserNavItem = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue