PolicyConfigCommitFunction<Defined in: policyCore/policyConfig/types.ts:44 UnlikeCommitParams,CommitAllowResult,CommitDenyResult> = (args,context) =>Promise<EnforcePolicyResponse<CommitAllowResultextendsz.ZodUndefined?ContextAllowResponseNoResult:ContextAllowResponse<z.infer<CommitAllowResult>> |CommitDenyResultextendsz.ZodUndefined?ContextDenyResponseNoResult:ContextDenyResponse<z.infer<CommitDenyResult>>>>
evaluate() and precheck(), commit receives specific arguments provided by the ability during its execute() phase
instead of than abilityParams and userParams that the ability was called with.
Type Parameters
CommitParams
CommitParams extends z.ZodType = z.ZodUndefined
CommitAllowResult
CommitAllowResult extends z.ZodType = z.ZodUndefined
CommitDenyResult
CommitDenyResult extends z.ZodType = z.ZodUndefined
Parameters
args
CommitParams extends z.ZodType ? z.infer<CommitParams> : undefined
context
PolicyContext<CommitAllowResult, CommitDenyResult>
Returns
Promise<EnforcePolicyResponse<CommitAllowResult extends z.ZodUndefined ? ContextAllowResponseNoResult : ContextAllowResponse<z.infer<CommitAllowResult>> | CommitDenyResult extends z.ZodUndefined ? ContextDenyResponseNoResult : ContextDenyResponse<z.infer<CommitDenyResult>>>>
