Setu-TS
    Preparing search index...

    Type Alias PolicyCheck<T>

    PolicyCheck: (
        principal: IPrincipal,
        target: T | undefined,
    ) => boolean | Promise<boolean>

    A check for an ability that requires a signed-in principal.

    An anonymous request never reaches it: the evaluator denies it first, with the 401-mapped authentication-required failure. Only a literal true allows; every other return value — and any throw or rejection — denies.

    Type Parameters

    • T

      The target type the policy is written for

    Type Declaration

      • (principal: IPrincipal, target: T | undefined): boolean | Promise<boolean>
      • Parameters

        Returns boolean | Promise<boolean>

    0.9.0