Skip to content

Function: createRbacChecker() ​

ts
function createRbacChecker(snapshot, options?): RbacChecker;

Defined in: packages/react/src/checker.ts:56

Builds a pure, synchronous checker for a snapshot (as returned by rbac.for(user).snapshot()). Used by RbacProvider, but usable on its own too.

Parameters ​

ParameterType
snapshotRbacSnapshot | null | undefined
options?RbacCheckerOptions

Returns ​

RbacChecker

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