Thing .share
POST /{namespace}/things/{thing}/share
Share grants a person, a Role or a guest Verbs on one record and everything it contains.
- Noun
- Thing
- Mode
do- Event
Thing.shared
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
thing | Thing | required | The record to share. |
to | Party | required | Who receives the grant: a person, or a guest who fills only the guest Role. |
verbs | string[] | required | The Verbs granted, such as get and comment. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
permission | Permission | required | The grant, scoped to the record and its contents. |
thing | Thing | required | The Thing shared. |
Effects
- Emits
Thing.shared. - Performed by the Security Engineer.
- Two-way: it runs at once, in the
try,sendanddomodes. - Follows containment Relationships, so sharing a folder shares documents added later.
- Widening a share follows the Approval rule for widening a Role; unsharing applies on the next call.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Thing.share |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |