diff --git a/client/components/settings/RealmSwitcher.tsx b/client/components/settings/RealmSwitcher.tsx index bfb42b37..a799271c 100644 --- a/client/components/settings/RealmSwitcher.tsx +++ b/client/components/settings/RealmSwitcher.tsx @@ -159,6 +159,15 @@ const RealmSwitcher = memo(function RealmSwitcher({ onSave, saving, }: RealmSwitcherProps) { + const { roles } = useAuth(); + const canSeeStaff = useMemo( + () => roles.some((r) => ["owner", "admin", "founder", "staff", "employee"].includes(r.toLowerCase())), + [roles], + ); + const visibleOptions = useMemo( + () => REALM_OPTIONS.filter((o) => (o.id === "staff" ? canSeeStaff : true)), + [canSeeStaff], + ); return (