CaslBehavior
Defined in: packages/pipeline-casl/src/casl.behavior.ts:40
Type-level authorization before the handler runs.
Loads the caller through ICaslPermissionSource, builds the ability, stores
it and the principal in context.items for CaslAuthorizer and
security-scoped keys, and throws UnauthorizedActionException unless every
requirement passes. An unauthenticated caller (null input) is denied.
Errors from the source or from malformed rules propagate unchanged.
A handler without rules runs without loading permissions.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CaslBehavior(
source):CaslBehavior
Defined in: packages/pipeline-casl/src/casl.behavior.ts:43
Parameters
Section titled “Parameters”source
Section titled “source”Returns
Section titled “Returns”CaslBehavior
Properties
Section titled “Properties”[PIPELINE_BEHAVIOR_ID]
Section titled “[PIPELINE_BEHAVIOR_ID]”
readonlystatic[PIPELINE_BEHAVIOR_ID]:"@nestjs-pipeline/casl:CaslBehavior"=CASL_BEHAVIOR_ID
Defined in: packages/pipeline-casl/src/casl.behavior.ts:41
Methods
Section titled “Methods”handle()
Section titled “handle()”handle(
context,next):Promise<unknown>
Defined in: packages/pipeline-casl/src/casl.behavior.ts:48
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”Promise<unknown>