Permissions in Routing and UI
Three-layer model
- Route-level guard (
PermissionGuard) - Action-level UI gating (hide/disable based on permission)
- Backend enforcement (source of truth)
Current behavior
- Super admin bypass is preserved.
- For users with permission lists from API, checks use permission IDs.
- Role fallback is used only when permissions are not present.
UX expectations
- Missing access to page -> unauthorized route flow
- Missing access to action -> hide/disable action controls
- Backend denial must still be handled gracefully in UI