Default
Function: default()
[object Object]
Defined in: app/layout/admin.tsx:24
A security-first layout wrapper for administrative and board-level routes.
This component acts as a protected route guard. It verifies that the authenticated user belongs to either the current active board group or the candidate board group before allowing access to nested admin features.
Logic Flow:
- Waits for global context IDs (
boardGroupId,candidateBoardGroupId) to be available. - Checks Keycloak group memberships against these IDs.
- Redirects unauthorized users to the home page (
/). - Displays a loading state while membership verification is in progress.
- Renders child routes via
<Outlet />only upon successful authorization.
Returns
string | Element