Extends the form-based .zddc editor at /.profile/zddc/edit?path=<dir> with an Apps section between Admins and the Effective chain. The section is a six-row table — default plus the five canonical apps — with one text input per row. Each row's right column shows a server- rendered "Resolves to" preview computed by walking the cascade through this directory and applying default + per-app composition. The preview displays the final URL, "embedded (build-time default)", or "local file: <path>" so operators see exactly what will be served. Help text covers the full spec syntax (channel/version/URL/path forms, :channel shorthand, default key) plus the ?v= per-request override and its cache-only security constraint. Permission gating is unchanged: existing CanEditZddc() strict-ancestor rule applies — subtree admins cannot edit the file that grants their own authority. Field-level errors land inline next to the input, just like the existing ACL/admins fields. POST handler (internal/handler/zddchandler.go) accepts a new Apps map in the JSON write request, validates via the existing zddc.ValidateFile flow (which now enforces apps.<name> spec syntax), and writes atomically through the unchanged zddc.WriteFile path. Three new tests: round-trip apps including the default key, per-field validation error returns, and editor renders the apps section with existing .zddc values pre-filled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| apps | ||
| archive | ||
| config | ||
| fs | ||
| handler | ||
| listing | ||
| tlsutil | ||
| zddc | ||