diff --git a/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx b/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx index 86944020b6..7dbf45785d 100644 --- a/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx +++ b/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx @@ -56,6 +56,7 @@ const REGEX_GLOBAL_PAGES = { const REGEX_EXCLUDE_NO_TEAM_PAGES = { MANAGE_POLICIES: /\/policies\/manage/i, + MANAGE_QUERIES: /\/queries\/manage/i, }; const testDetailPage = (path: string, re: RegExp) => { @@ -96,7 +97,6 @@ const SiteTopNav = ({ isGlobalMaintainer, isAnyTeamMaintainer, isNoAccess, - isSandboxMode, } = useContext(AppContext); const isActiveDetailPage = isDetailPage(currentPath); @@ -187,7 +187,7 @@ const SiteTopNav = ({ { @@ -238,7 +237,6 @@ const SiteTopNav = ({ currentUser={currentUser} isAnyTeamAdmin={isAnyTeamAdmin} isGlobalAdmin={isGlobalAdmin} - isSandboxMode={isSandboxMode} /> ); diff --git a/frontend/components/top_nav/SiteTopNav/navItems.ts b/frontend/components/top_nav/SiteTopNav/navItems.ts index cbf0654723..00e145ae4b 100644 --- a/frontend/components/top_nav/SiteTopNav/navItems.ts +++ b/frontend/components/top_nav/SiteTopNav/navItems.ts @@ -27,8 +27,7 @@ export default ( isAnyTeamAdmin = false, isAnyTeamMaintainer = false, isGlobalMaintainer = false, - isNoAccess = false, - isSandboxMode = false + isNoAccess = false ): INavItem[] => { if (!user) { return []; @@ -67,7 +66,7 @@ export default ( regex: new RegExp(`^${URL_PREFIX}/controls/`), pathname: PATHS.CONTROLS, }, - exclude: isSandboxMode || !isMaintainerOrAdmin, + exclude: !isMaintainerOrAdmin, withParams: { type: "query", names: ["team_id"] }, }, { diff --git a/frontend/components/top_nav/UserMenu/UserMenu.tsx b/frontend/components/top_nav/UserMenu/UserMenu.tsx index 4e08464120..38f7986a43 100644 --- a/frontend/components/top_nav/UserMenu/UserMenu.tsx +++ b/frontend/components/top_nav/UserMenu/UserMenu.tsx @@ -17,7 +17,6 @@ interface IUserMenuProps { isAnyTeamAdmin: boolean | undefined; isGlobalAdmin: boolean | undefined; currentUser: IUser; - isSandboxMode?: boolean; } const UserMenu = ({ @@ -26,7 +25,6 @@ const UserMenu = ({ isAnyTeamAdmin, isGlobalAdmin, currentUser, - isSandboxMode = false, }: IUserMenuProps): JSX.Element => { const accountNavigate = onNavItemClick(PATHS.ACCOUNT); const dropdownItems = [ @@ -44,7 +42,7 @@ const UserMenu = ({ }, ]; - if (isGlobalAdmin && !isSandboxMode) { + if (isGlobalAdmin) { const manageUsersNavigate = onNavItemClick(PATHS.ADMIN_USERS); const manageUserNavItem = {