Skip to main content

Function: createRefusals()

createRefusals(args): object

Defined in: authorizer.ts:41

Parameters​

ParameterTypeDescription
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) => booleanTrue when pattern reaches the resource for action.
args.evaluator.decideOnChain(check) => PolicyDecisionEvery 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 | nullThe name an owner's reach is rooted at; null for top, which reaches everything.
args.evaluator.withinReach(check) => booleanTrue 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​

ParameterType
check{ action: string; chain: ResourceChain | null; context?: Record<string, string>; groups: LabeledPolicySets<Principal>; }
check.actionstring
check.chainResourceChain | null
check.context?Record<string, string>
check.groupsLabeledPolicySets<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​

ParameterType
check{ action: string; chain: ResourceChain | null; context?: Record<string, string>; groups: LabeledPolicySets<Principal>; }
check.actionstring
check.chainResourceChain | null
check.context?Record<string, string>
check.groupsLabeledPolicySets<Principal>

Returns​

boolean