Skip to content

Commit 66c4c5a

Browse files
committed
docs, changeset: the last-admin guard's ledger switch-off is the ruled check, not a flat refusal
Claude-Session: https://claude.ai/code/session_01ByzDx6dv5xWV1SCpCviLRU Co-authored-by: Claude <noreply@anthropic.com>
1 parent f4db2f3 commit 66c4c5a

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

‎.changeset/15204-s1-position-permission-sets.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The one-line fix for an app that bound sets to its positions with a boot-time bi
3737

3838
**`@objectstack/plugin-security`.** The plugin binds the catalog read (engine registry and metadata service) to its engine at `start()`. At `kernel:ready` the built-in `everyone` anchor declares the deployment's baseline in its `permissionSets`: the app's `isDefault` set and the platform's `member_default`. It is judged by the same high-privilege check against the stack's declared capabilities that the boot binding used. Under a wall the envelope now carries `member_default` beside the app's set, as it did under `single`. `member_default` carries no system or tab permission, and enforcement already applied it to every human as the additive baseline. A Setup edit of a position row under `single` keeps the `permissionSets` the stored definition names (the row has no column for it).
3939

40-
**`@objectstack/plugin-auth`.** The last-administrator guard follows what the resolver reads. Its standing-key map judges `sys_metadata_activation` (`metadata_type`, `name`, `active`) in place of `sys_permission_set`. A new hook refuses a ledger write that switches `admin_full_access` off (`refuseLedgerSwitchingAdminOff`). Its `sys_permission_set` hooks stay registered, unchanged.
40+
**`@objectstack/plugin-auth`.** The last-administrator guard follows what the resolver reads. Its standing-key map judges `sys_metadata_activation` (`metadata_type`, `name`, `active`) in place of `sys_permission_set`. A ledger write that switches `admin_full_access` off is refused only when it would leave no administrator who can sign in, and switching it back on is never refused. The guard no longer judges `sys_permission_set` writes, because the resolver no longer reads that row.
4141

4242
**`@objectstack/platform-objects`.** The position metadata form gains a `permissionSets` row, translated in zh-CN, ja-JP and es-ES.
4343

‎content/docs/permissions/authorization.mdx‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -437,17 +437,19 @@ not re-derived — that would replicate the resolver's aggregation).
437437

438438
**Absent is ACTIVE.** Only a ledger row whose `active` reads false takes a
439439
grant away; a permission set or position with no ledger row is in effect. The
440-
last-administrator guard's enumeration still reads the catalogue row's
441-
`active`, so it counts a row-deactivated `admin_full_access` as off and refuses
442-
more than it must, never less.
443-
444-
**Switching the break-glass set off is refused.** A ledger row switching
445-
`admin_full_access` off would un-make every platform admin who holds it
446-
*through a grant row*, in one write — and switching it back on needs the
447-
permission just lost. The last-administrator guard refuses such a ledger
448-
write outright, whatever the administrator population (ADR-0135 D5.2), and
449-
refuses one whose target row it cannot read. Switching it back on is never
450-
refused.
440+
last-administrator guard reads the same two places the resolver does: whether
441+
the catalogue holds `admin_full_access`, and whether the ledger switches it
442+
off. It reads no catalogue row, so a row's `active` changes nothing it counts.
443+
444+
**Switching the break-glass set off is refused while it would leave no
445+
administrator.** A ledger row switching `admin_full_access` off un-makes every
446+
platform admin who holds it *through a grant row*, in one write — and
447+
switching it back on needs the permission just lost. The last-administrator
448+
guard judges such a ledger write like every other write that can take
449+
standing away (ADR-0135 D5.2): it is refused only when nobody who can sign in
450+
would still administer the environment. A configured administrator or an
451+
organization owner or admin still standing permits it. A ledger read that
452+
fails refuses the write. Switching it back on is never refused.
451453

452454
Deactivation is an incident-response control, so what it does **not** touch is
453455
deliberate. Administration surfaces keep listing and editing a deactivated

0 commit comments

Comments
 (0)