Interface: RbacModuleOptions<T>
Defined in: packages/nestjs/src/options.ts:10
T is the engine's names type (createRbac<AppRbac>()), inferred from rbac. Nest's parameter decorators can't carry it to @CurrentRbac(): type the parameter as SubjectRbac<AppRbac> (see createRbacDecorators).
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | DefaultRbacTypes |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
exposeRequirements? | boolean | Include the required roles/permissions in the 403 body (required). Default: false (like spatie's display_permission_in_exception). | packages/nestjs/src/options.ts:26 |
getSubject | (context) => MaybePromise<Subject | null | undefined> | Resolves the authenticated subject for this execution context (e.g. from request.user). Return null / undefined for guests. | packages/nestjs/src/options.ts:17 |
guard? | string | RBAC guard name (e.g. web or api) — not a Nest guard. Defaults to the engine's defaultGuard. | packages/nestjs/src/options.ts:19 |
rbac | Rbac<T> | The RBAC engine created with createRbac(...). | packages/nestjs/src/options.ts:12 |
team? | (context) => MaybePromise<TeamId | undefined> | Resolves the current team (only when the engine was created with teams: true). | packages/nestjs/src/options.ts:21 |
