gatehouse-ts
    Preparing search index...

    Function buildOrPolicy

    • Creates a policy that grants access if any sub-policy grants access.

      Type Parameters

      • Sub

        Subject type

      • Res

        Resource type

      • Act

        Action type

      • Ctx

        Context type

      Parameters

      • policies: { name?: string; policies: Policy<Sub, Res, Act, Ctx>[] }

        Array of policies where any one can grant access

      Returns OrPolicy<Sub, Res, Act, Ctx>

      A combined OR policy

      const policy = buildOrPolicy([adminRolePolicy, documentOwnerPolicy]);