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

Function: mayDelegate()

mayDelegate(delegation): boolean

Defined in: packages/authz/src/permission.ts:68

Delegation narrows (17 D7): a grantor may confer only a bundle whose permissions are a subset of their own, for an organization inside their own subtree. A bundle larger than the grantor's, or an organization above or beside their scope, is not allowed. The same rule decides who may revoke: a grant larger than your own is not yours to end.

It does not check that the grantor holds grant.create or grant.revoke: that is hasPermission, and the handler makes both.

Parameters​

delegation​

Delegation

The grantor, the bundle's permissions and the organization's path.

Returns​

boolean

Whether the grant narrows.