Skip to content

Interface: BeforeContext<T> ​

Defined in: packages/core/src/rbac.ts:82

Context passed to the RbacOptions.before hook.

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfigDefaultRbacTypes

Properties ​

PropertyTypeDescriptionDefined in
permissionstringThe permission name being checked.packages/core/src/rbac.ts:89
subjectSubjectRbac<T, string>The subject being checked (already scoped to its guard & team). With per-guard names, it accepts the names of every guard, since the hook runs for all of them.packages/core/src/rbac.ts:87

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