Skip to content

Commit 191cc69

Browse files
committed
docs(plugin-security): the changeset and the delegated-administration page state the rule for a user the caller cannot read
Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
1 parent e86302c commit 191cc69

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security)!: a delegated answer about a user the caller cannot read does not depend on that user's existence or memberships
6+
7+
Clause-②: no (narrowing) — the delegated-administration gate judges every target user through the caller's own read, so a user the caller cannot read is outside every delegated subtree: a delegated administrator no longer edits or removes a stored direct grant of such a user, and no longer explains such a user's access or reads its effective access. Nothing is widened: no export, error code or status is added.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export of the package entry changes: an adminScope and a direct grant keep their shape and meaning, and a target user is judged through the caller's own read. There is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing in the delegated-administration gate (`@objectstack/plugin-security`), only for a delegated administrator asking about a user it cannot read.
13+
14+
- **Rule.** A delegated answer about a user the caller cannot read does not depend on that user's existence or memberships (ADR-0090 D12). Wherever the gate judges a target user, such a user is outside every delegated subtree, exactly as an id naming no user is: the holder a direct grant names (a new grant, or a stored grant pointed at another user), the holder a stored grant keeps (its removal, or an edit that leaves `user_id` as stored), and the user the explain doors ask about.
15+
- **What a caller sees.** A delegated direct-grant write whose target user the caller cannot read answers `403 DELEGATION_SCOPE_VIOLATION`, with the sentence and details of every target outside the subtree. `security/explain` with a `userId`, and `security/users/:id/effective-access`, answer a delegate asking about a user it cannot read with their refusal of a user the caller may not describe (`403 PERMISSION_DENIED`), the answer an id naming no user gets.
16+
- **Unchanged.** A target user the caller reads is judged as before, on its business units. A tenant-level administrator's writes, and an organization administrator's writes and explain coverage, are judged as before.
17+
- **Who moves.** A delegate whose stored grant's holder it cannot read can no longer edit or remove that grant, and a delegate can no longer explain, or read the effective access of, a user it cannot read. Tenant-level and organization administrators keep both: either still removes such a grant, and explains such a user, as before.

‎content/docs/permissions/delegated-administration.mdx‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ fact. Capability bits are never BU-scoped.
102102

103103
The [explain engine](/docs/permissions/explain) closes the loop twice:
104104

105-
- explaining **another user** is authorized by `manage_users` *or* a delegated
106-
`adminScope` whose subtree covers that user — a delegate can diagnose their
107-
own people, and only their own people;
105+
- explaining **another user** — and reading that user's effective access — is
106+
authorized by `manage_users`, organization administration of an
107+
organization that user is a member of, *or* a delegated `adminScope` whose
108+
subtree covers that user — a delegate can diagnose their own people, and
109+
only their own people. A scope covers a user the delegate can read, through
110+
a business unit of the subtree; a user it cannot read is covered by no
111+
scope, so the answer about that user does not depend on whether it exists
112+
or what it is a member of. The direct-grant write gate judges its target
113+
user the same way, a stored grant's holder included;
108114
- contributor attribution plus the `granted_by` stamp answer both *who
109115
granted this* and *who could have*.
110116

0 commit comments

Comments
 (0)