diff --git a/src/app/components/site/NavigationBar.tsx b/src/app/components/site/NavigationBar.tsx index 15c107ccde..33c66f6b82 100644 --- a/src/app/components/site/NavigationBar.tsx +++ b/src/app/components/site/NavigationBar.tsx @@ -4,8 +4,8 @@ import { useAppSelector, selectors } from "../../state"; import { isAdmin, isAdminOrEventManager, + isContentEditor, isEventLeader, - isStaff, isTeacherOrAbove, isTutorOrAbove, } from "../../services"; @@ -66,13 +66,17 @@ export const NavigationBar = () => { Safeguarding - {(isStaff(user) || isEventLeader(user)) && ( + {(isAdminOrEventManager(user) || isContentEditor(user) || isEventLeader(user)) && ( }> - {isStaff(user) && Admin tools} + {(isAdminOrEventManager(user) || isContentEditor(user)) && Admin tools} {isAdmin(user) && User manager} {(isEventLeader(user) || isAdminOrEventManager(user)) && Event admin} - {isStaff(user) && Site statistics} - {isStaff(user) && Content errors} + {(isAdminOrEventManager(user) || isContentEditor(user)) && ( + Site statistics + )} + {(isAdminOrEventManager(user) || isContentEditor(user)) && ( + Content errors + )} )} diff --git a/src/app/services/user.ts b/src/app/services/user.ts index fd1acc966c..6f27c8679c 100644 --- a/src/app/services/user.ts +++ b/src/app/services/user.ts @@ -47,6 +47,10 @@ export function isEventManager(user?: UserRoleAndLoggedInStatus | null): boolean return isDefined(user) && user.role === "EVENT_MANAGER" && (user.loggedIn ?? true); } +export function isContentEditor(user?: UserRoleAndLoggedInStatus | null): boolean { + return isDefined(user) && user.role === "CONTENT_EDITOR" && (user.loggedIn ?? true); +} + export function isStaff(user?: UserRoleAndLoggedInStatus | null): boolean { return ( isDefined(user) &&