Primitive
permission.grantOrgRole
BETAShort name: grantOrgRole
Version: 1.0.0
Grant an org role by creating (or reusing) an active org-role-grant atom.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| orgAtomId | objectId | true | Organization atom id receiving the grant. |
| role | string | true | Role to grant (org_admin, org_member). |
| userId | objectId | true | User id receiving the role grant. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| created | boolean | false | True when a new grant atom was created; false when an active grant was reused. |
| grantAtomId | string | false | Grant atom id that represents the active role grant. |
| ok | boolean | false | True when grant operation succeeds. |
| role | string | false | Granted role. |
| userId | string | false | Target user id receiving the role. |