refinement phase 2
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
'use client';
|
||||
import type { ReactNode } from 'react';
|
||||
import { AdminLayout } from '@/layout';
|
||||
import { RoleGuard } from '@/components/auth';
|
||||
import { APP_ROLES } from '@/constants';
|
||||
|
||||
/*
|
||||
* Admin / backoffice route group (/admin/…) — desktop-oriented ops console (f15)
|
||||
* with a persistent sidebar.
|
||||
* with a persistent sidebar. RoleGuard gates the shell on the (collapsed) admin actor
|
||||
* role; the per-console fine-grained gating stays with useAdminCapabilities inside.
|
||||
*/
|
||||
export default function AdminRouteLayout({ children }: { children: ReactNode }) {
|
||||
return <AdminLayout>{children}</AdminLayout>;
|
||||
return (
|
||||
<RoleGuard expected={APP_ROLES.ADMIN}>
|
||||
<AdminLayout>{children}</AdminLayout>
|
||||
</RoleGuard>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user