ZDDC/zddc/internal/policy
ZDDC bd219afeb7 feat(policy): config-edit is a standing permission, not elevation-gated
Editing a .zddc you administer no longer requires toggling admin mode.
Elevation becomes purely additive — it only adds the WORM/destructive
overrides ("things you otherwise couldn't do"), never a prerequisite for
authority you already hold.

Mechanism: a new zddc.IsConfigEditor(chain, email) reports STANDING
config-edit authority — being a subtree admin (admins: cascade) OR holding
the `a` verb — without the elevation gate. InternalDecider.Allow grants
VerbA on that basis ABOVE the WORM clamp: config is not WORM-protected
data, and VerbA only ever authorises .zddc/.zddc.zip/role mutations, never
write/delete of records (those stay clamped + elevation-gated). The full
WORM/ACL bypass (IsActiveAdmin) is unchanged — still admins: + Elevated.

This flows for free to the client: EffectiveVerbsFromChainP loops
ActionAdmin through the decider, so /.profile/access + cap.has(node,'a')
light up the .zddc form editor with no client change, and ServeZddcFile
already gates raw .zddc reads on directory read ACL (config is visible).

A standing subtree admin can thus rewrite their subtree's policy
(admins:/ACL/roles) un-elevated — bounded to their scope (authority
cascades down only, never up), logged, and unable to touch WORM data or
secrets without elevating. That's "admin of X = owns X's policy."

Tests: new TestStandingConfigEdit (decider matrix incl. WORM-transcending
config-edit + data-write still gated); updated the old "un-elevated admin
cannot edit .zddc" invariants (TruthTable, ZddcPut/DeleteMatrix,
NoSilentBypass now scoped to WORM/out-of-scope, profile PathVerbs) to the
new model. Full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:00:54 -05:00
..
rego refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
federal_parity_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
parity_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
policy.go feat(policy): config-edit is a standing permission, not elevation-gated 2026-06-05 17:00:54 -05:00
policy_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
principal_test.go feat(policy): config-edit is a standing permission, not elevation-gated 2026-06-05 17:00:54 -05:00
rego.go feat(server): federal-mode reference Rego (parent-deny-is-absolute) 2026-05-04 18:05:44 -05:00
standing_config_test.go feat(policy): config-edit is a standing permission, not elevation-gated 2026-06-05 17:00:54 -05:00