Function: createRefusals()
createRefusals(
args):object
Defined in: authorizer.ts:41
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { evaluator: { chainMatches: (check) => boolean; decideOnChain: (check) => PolicyDecision; ownerRoot: (owner) => string | null; withinReach: (check) => boolean; }; } | - |
args.evaluator | { chainMatches: (check) => boolean; decideOnChain: (check) => PolicyDecision; ownerRoot: (owner) => string | null; withinReach: (check) => boolean; } | - |
args.evaluator.chainMatches | (check) => boolean | True when pattern reaches the resource for action. |
args.evaluator.decideOnChain | (check) => PolicyDecision | Every tagged node's evaluation must allow; the first refusal decides. A path alias names a place, not a type, so a chain named by one alone states its type or is refused. |
args.evaluator.ownerRoot | (owner) => string | null | The name an owner's reach is rooted at; null for top, which reaches everything. |
args.evaluator.withinReach | (check) => boolean | True when the resource sits within the owner's reach for action. |
Returns
findRefusal
findRefusal: <
Principal>(check) =>Refusal<Principal> |undefined
The first group refusing the check, with the denial of the Deny that
decided it. A group holding no set allows nothing, as one holding an
empty set; so does a check that names no resource.
Type Parameters
| Type Parameter |
|---|
Principal |
Parameters
| Parameter | Type |
|---|---|
check | { action: string; chain: ResourceChain | null; context?: Record<string, string>; groups: LabeledPolicySets<Principal>; } |
check.action | string |
check.chain | ResourceChain | null |
check.context? | Record<string, string> |
check.groups | LabeledPolicySets<Principal> |
Returns
Refusal<Principal> | undefined
policyGroupsAllow
policyGroupsAllow: <
Principal>(check) =>boolean
Whether groups allow the check, without recording a refusal.
Type Parameters
| Type Parameter |
|---|
Principal |
Parameters
| Parameter | Type |
|---|---|
check | { action: string; chain: ResourceChain | null; context?: Record<string, string>; groups: LabeledPolicySets<Principal>; } |
check.action | string |
check.chain | ResourceChain | null |
check.context? | Record<string, string> |
check.groups | LabeledPolicySets<Principal> |
Returns
boolean