ZDDC/zddc/internal
ZDDC c59bea183e feat(server): honor ?admin=true|false elevation on every endpoint
shared/elevation.js toggles admin mode via the ?admin= URL param, but it's
client-side JS — it only runs on HTML tool pages, where it sets the sticky
zddc-elevate cookie. A raw endpoint (a directory's JSON listing, zip
browsing at /<…>.zip/, the file API) loads no JS, so ?admin=true was inert
there and such requests stayed un-elevated.

ACLMiddleware now reads the same ?admin= toggle directly: true|1|on|yes
elevates the request, false|0|off|no drops it (overriding the cookie for
that request). This is per-request only — the server doesn't set/clear the
cookie; elevation.js still owns sticky persistence on pages. Elevation
grants powers only to a caller who already holds admin authority (every
admin call site re-checks via IsActiveAdmin), so a non-admin's ?admin=true
sets the forensic flag but confers nothing.

Makes e.g. GET /.zddc.zip/?admin=true work for an admin without first
arming the cookie on a page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:13:30 -05:00
..
apps feat(server): local-only tool-HTML override; remove apps URL/version fetching 2026-06-04 08:59:28 -05:00
archive fix(archive): log swallowed walkdir errors during transmittal indexing 2026-05-21 16:41:29 -05:00
auth feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
cache fix(cache): track background revalidation goroutines; drain on shutdown + in tests 2026-05-21 16:21:37 -05:00
config feat(server): local-only tool-HTML override; remove apps URL/version fetching 2026-06-04 08:59:28 -05:00
convert refactor(convert): wrapper-in-image owns the sandbox; Go just exec's binaries 2026-05-19 07:47:58 -05:00
fs feat(server): elevated admins can browse the .zddc.zip config bundle 2026-06-04 10:39:57 -05:00
handler feat(server): honor ?admin=true|false elevation on every endpoint 2026-06-04 13:13:30 -05:00
jsonschema feat(forms): augment served schema with cascade field_codes + locks 2026-05-19 09:58:21 -05:00
listing refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
policy feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -05:00
tlsutil feat(server): TLS hardening per NIST SP 800-52 Rev. 2 + HSTS 2026-05-04 17:55:52 -05:00
zddc feat(server): route no-slash directory URLs through views.dir (cascade spine) 2026-06-04 10:01:31 -05:00
zipfs feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00