Appearance
apps/web/src/lib/roles.ts ​
Auto-generated by
scripts/generate-file-docs.ts. Do not edit — overwritten on every run.
Purpose ​
roles.ts — client-side role utilities. IMPORTANT: useAppRole() reads the role from useCurrentUser() (API-sourced, always from the DB). It must NEVER read from Clerk's publicMetadata or unsafeMetadata — those are not trusted per ADR 0006. hasRoleAtLeast() is a pure hierarchy utility — usable anywhere. ADR 0006, ADR 0023, ADR 0037. AB#3902. /
Exports ​
export type AppRoleexport function hasRoleAtLeastexport function isFeatureRoleexport function useAppRole
Imports ​
./useCurrentUser
Imported by ​
(not referenced in graph, or graph not yet generated)