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> |
||
|---|---|---|
| .. | ||
| adminhandler.go | ||
| adminhandler_test.go | ||
| archivehandler.go | ||
| archivehandler_test.go | ||
| cors.go | ||
| cors_test.go | ||
| directory.go | ||
| logring.go | ||
| logring_test.go | ||
| middleware.go | ||
| projectshandler.go | ||
| projectshandler_test.go | ||
| static.go | ||
| zddc_assets.go | ||
| zddceditor.go | ||
| zddchandler.go | ||
| zddchandler_test.go | ||