انتقل إلى المحتوى الرئيسي

Function: joinsRunningAndGoverning()

joinsRunningAndGoverning(permissions): boolean

Defined in: packages/contracts/src/authorization.ts:172

Whether a set of permissions joins running an organisation with governing the trust tree: grant.create together with any of accreditation.apply, accreditation.admit or accreditation.publish.

Those two halves are the dangerous pair because delegation narrows. A grantor can hand on only what it holds, so an account with grant.create and a governance permission can make a second account that holds the same governance permission. Four eyes is then two accounts and one person: the first admits, the second approves. An account with grant.create alone has no governance permission to hand on, and one with governance permissions alone cannot make anybody.

It is a rule on what a bundle resolves to and never on what it is called, because a bundle with another code and the same permissions is the same authority. The setup runner and identity's bootstrap.apply handler both ask it, and both refuse such a bundle at the anchor where duties are kept apart (separatesDuties in @oktoid/secrets), so they cannot disagree about what counts.

What it does not do: it keeps the duties in separate accounts, not in separate people. Whoever holds the bootstrap key can still create two principals and control both.

Parameters​

permissions​

readonly string[]

A bundle's permissions as resolved, from a request or as stored. Codes this build does not define are ignored.

Returns​

boolean

true when one holder could mint a second account to satisfy four eyes.