const MaxOperations
MaxOperations bounds the number of operations one policy defines.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package policies is the Remix Lab permission block. A Policy maps named operations to an eligibility rule evaluated a...
Package policies is the Remix Lab permission block. A Policy maps named operations to an eligibility rule evaluated against a membership reader.
Each operation is defined once with a floor: the most permissive rule it may ever be set to. Administrative operations get a floor of RuleReviewer or RuleOwner, so reconfiguring a policy can never hand admin powers to ordinary members or the public.
Operations with an owner floor (typically policy changes and owner appointment) can never be disabled: setting them to RuleNobody would lock the owners out permanently.
Policy changes affect future operations only. Ballot eligibility follows the electorate frozen when the ballot opened, not the current policy.
MaxOperations bounds the number of operations one policy defines.
Policy evaluates named operations. Hold it in an unexported host-realm variable; its Set method changes authorization.
Allowed reports whether actor may perform op, without building an error.
Authorize implements core.AuthorizationPolicy. Unknown operations are denied.
Define registers op with an initial rule and a floor. It panics on invalid input because host realms call it from init with constant arguments.
List returns every operation's rule, ordered by operation name.
Rule returns the current rule for op.
Set changes the rule for a defined op. The host must have authorized the actor (typically through a "policy.set" operation with an owner floor).
Rule is an eligibility requirement. Rules are ordered from most to least permissive.
RuleView is an inert description of one operation's rule.