Skip to content

Type Alias: AccessControlRuleHandler<T> ​

AccessControlRuleHandler<T> = (context, input?) => Promise<boolean>

An action's own access rule (the rule action option): resolve true to allow the request, false to deny it with an AccessDeniedException; a thrown error denies it with that error.

Type Parameters ​

T ​

T extends BaseContext<Record<string, any>>

Parameters ​

context ​

T

The request's context.

input? ​

ActionPattern<any>

The action's validated input.

Returns ​

Promise<boolean>

Whether the request is allowed.

Released under the MIT License.