Type Alias: RbacServer<T, G, A>
ts
type RbacServer<T, G, A> = GuardsFor<T, G, A> & object;Defined in: packages/react-router/src/server.ts:163
What createRbacServer() returns: the subject of a request, its snapshot, and the guards.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | DefaultRbacTypes |
G extends string | DefaultGuardName<T> |
A extends RouteArgs | RouteArgs |
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
getRbac() | (args) => Promise<SubjectRbac<T, ScopedGuardName<T, G>> | null> | The subject of this request (SubjectRbac), or null for guests. Resolved once per request: several guards in one loader call getSubject once. | packages/react-router/src/server.ts:172 |
getSnapshot() | (args, options?) => Promise<RbacSnapshot | null> | The subject's roles and permissions for the client (<RbacProvider snapshot> of @anievo-id/rbac-evolution-react), or null for guests. Return it from the root loader. | packages/react-router/src/server.ts:177 |
