Skip to content

Interface: RbacProviderProps ​

Defined in: packages/react/src/context.tsx:10

Properties ​

PropertyTypeDescriptionDefined in
children?ReactNode-packages/react/src/context.tsx:22
loading?booleanThe snapshot is still being fetched. <Can>, <Cannot> and <HasRole> then render nothing (not even fallback), so nothing flashes before the real permissions arrive. Default: false.packages/react/src/context.tsx:21
snapshotRbacSnapshot | null | undefinedRoles & permissions of the current user, e.g. from rbac.for(user).snapshot() on the server. null = guest.packages/react/src/context.tsx:12
superAdminRoles?readonly string[]Roles that pass every can check (super admin).packages/react/src/context.tsx:16
wildcard?booleanEnable wildcard matching (articles.*). Must match the server's wildcard setting. Default: false.packages/react/src/context.tsx:14

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