fix(c5,arch-021): system dashboard nav entry only for system admins
This commit is contained in:
@@ -79,7 +79,11 @@ export function Sidebar() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const allMenuItems = useMemo(() => {
|
const allMenuItems = useMemo(() => {
|
||||||
const staticItems = singleItems.map(item => ({
|
const staticItems = singleItems
|
||||||
|
// Backend enforces require_admin on system dashboard routes — hide the
|
||||||
|
// nav entry from non-admin users instead of showing a dead link.
|
||||||
|
.filter(item => item.to !== '/system-dashboard' || user?.is_system_admin)
|
||||||
|
.map(item => ({
|
||||||
path: item.to,
|
path: item.to,
|
||||||
labelKey: item.labelKey,
|
labelKey: item.labelKey,
|
||||||
label: item.labelKey,
|
label: item.labelKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user