ZDDC/zddc/internal/handler
ZDDC e44ccc3500 feat(zddc-server): delegated subtree admins + built-in .zddc editor
Generalize the admin model from "single root super-admin" to a
delegated chain: a `<dir>/.zddc/admins` list grants admin authority
for that subtree, with a strict-ancestor rule preventing
self-elevation (you cannot edit the .zddc that grants your own
authority — only files strictly below it).

Add a guided server-rendered editor at /.admin/zddc/edit?path=<dir>
so subtree admins can manage their fiefdoms without filesystem
access. JSON API at /.admin/zddc covers GET (file + effective chain
+ can_edit), POST (atomic write + cache invalidation), DELETE,
plus a /tree endpoint listing every .zddc visible to the caller.
Optional theming via <root>/.admin.css.

Validation: glob syntax check, root-self-demotion rejection,
reserved-prefix path guard, YAML round-trip sanity. Writes are
atomic (temp file + fsync + rename) and invalidate the policy
cache.

Also includes the prior in-flight `Title` field on ProjectInfo
so per-project .zddc titles surface on the landing-page picker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:52:06 -05:00
..
adminhandler.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
adminhandler_test.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
archivehandler.go fix(zddc-server): per-revision .archive entries + global index with ACL filter 2026-04-29 06:33:32 -05:00
archivehandler_test.go fix(zddc-server): per-revision .archive entries + global index with ACL filter 2026-04-29 06:33:32 -05:00
cors.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
cors_test.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
directory.go Initial commit 2026-04-27 11:05:47 -05:00
logring.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
logring_test.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
middleware.go feat(zddc-server): debug-level dump of every request's full headers 2026-04-28 17:53:55 -05:00
projectshandler.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
projectshandler_test.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
static.go Initial commit 2026-04-27 11:05:47 -05:00
zddc_assets.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
zddceditor.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
zddchandler.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00
zddchandler_test.go feat(zddc-server): delegated subtree admins + built-in .zddc editor 2026-04-29 12:52:06 -05:00