Audit rbac
This workflow generates a map of which routes are protected by which roles.
- Scan Route Files:
Apps/platform/src/app(recursively).-
Look for
layout.tsxandpage.tsx. -
Analyze Protection:
- Search for
checkRouteAccess(path, role)calls. -
Search for
requireRole(['admin', 'staff'])calls in Server Actions (src/app/_actions). -
Generate Report:
- Create or Update
RBAC_CURRENT_MAP.md. - Format:
| Route/Action | Roles Required | Source File | -
Highlight any routes that appear unprotected (missing checks).
-
Verify Blueprint:
- Compare findings against
apps/platform/RBAC_IMPLEMENTATION_BLUEPRINT.md(if applicable) to see if we are meeting our goals.