useVexAccess
useVexAccess<
TSubjects>():VexAccessConfig<TSubjects, readonlyAccessResource[],string,string|undefined,Partial<Record<string,CustomActionsInput>>> |undefined
Defined in: packages/react/src/config/VexConfigContext.tsx:72
Reads the RBAC access matrix for this session — derived directly from
VexConfigContext, the same config hasPermission/usePermission check
against.
Deliberately reads the raw context instead of going through useVexConfig():
hooks/useCanAccessAdminPanel.ts renders this on public pages where no
VexConfigProvider is mounted (the normal state of every public page), so
this must degrade to undefined there instead of throwing.
Type Parameters
Section titled “Type Parameters”TSubjects
Section titled “TSubjects”TSubjects extends Record<string, SubjectEntry> = Record<string, SubjectEntry>
Returns
Section titled “Returns”VexAccessConfig<TSubjects, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>> | undefined
The access config for the session, or undefined when RBAC is
not configured OR no provider is mounted — hasPermission treats
undefined as the escape hatch and allows every check, not the reverse.