Subject
What a grant covers, either a node with or without its subtree, or a group.
Fetching schema…

Part of Stem. This page defines subject, the field of a Grant that says what is covered. It is a union of two closed structs discriminated by kind.

A subject is the thing authority is held over: a node and by default everything placed under it, or a group.

Variants

kind

page

covers

node

node

a node and, unless exact, its whole subtree

group

group

a group's membership

Rules

Subjects follow the placement tree, so a grant on a folder covers the documents moved into it later and stops covering the ones moved out. A delegated grant's subject must be inside the delegator's subject: the same node or a descendant, or the same group. The space root as a subject covers the whole space, which is what the roadmap's "a writer of a space is a writer of the whole space" means; narrower subjects remain available because capabilities now target stable nodes instead of paths, so a move cannot change what a grant covers.

Today (HM24)

A Capability has a path scope, recursive by segment. Path scopes are being discontinued because moving a document changes its authority. Node subjects restore granular sharing without that problem.

Example

{"kind": "node", "space": {"/": {"bytes": "7QEE...Starlight"}}, "node": "bafyreiujzdegxdncf32epf3dhodzdocis2jhtlgmxgedn73u55xtplpft7"}

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime