Skip to content

Function: roleRequirement() ​

ts
function roleRequirement(names, options?): RbacRequirement;

Defined in: packages/core/src/requirements.ts:213

Any of the roles by default; { all: true } = all of them. Throws TypeError without names.

Parameters ​

ParameterType
namesreadonly RequirementNames[]
options?RoleRequirementOptions

Returns ​

RbacRequirement

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