Skip to content

Interface: RequireRolesOptions ​

Defined in: packages/nestjs/src/decorators.ts:46

Options of @RequireRoles(): { all } and { guard }.

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
all?booleanRequire ALL of the roles (instead of any). Default: false.RoleRequirementOptions.allpackages/core/dist/index.d.ts:932
guard?stringCheck in this guard instead of the request's (subject.withScope({ guard })), like spatie's role:admin,api. Default: the guard of the resolved subject (RbacModule guard option).RbacDecoratorOptions.guardpackages/nestjs/src/decorators.ts:39

Released under the MIT License. Inspired by spatie/laravel-permission.