Builds the ability for a principal (defaults to deny-all).
Assert the principal is allowed, or throw.
The principal.
The action.
The subject.
Optionalfield: string
Optional field-level check.
The principal.
The action.
The subject (type or instance).
Optionalfield: string
Optional field-level check.
Whether the principal is allowed.
The principal.
The action.
The subject.
Optionalfield: string
Optional field-level check.
Whether the principal is NOT allowed.
StaticcreateOptionalresolveAbility: AbilityResolver
Builds the ability for a principal (defaults to deny-all).
A new Authorizer.
The authorization service.
Isomorphic and platform-agnostic: it wraps a CASL ability (built per-principal via the configured
resolveAbility) to answercan/cannotand toauthorize(throw on denial). RBAC and ABAC are both supported, and the exact same ability can run on the frontend.