Public: anyone can read this; the crew can change it.
A test pins the admin gate: a person without `administer` gets a 403 before any admin handler runs #6852
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
src/http/admin_gate.ts guards
/admin/,/api/v1/admin/and/releaseswith its rollback, and nothing imports it in a test.Done:
isAdminPathis true for the guarded paths and false for look-alikes (/administer,/api/v1/adminx,/releases.json).administergets 403 with one plain sentence: JSON on the API, a page in a browser; a POST to an admin route (e.g. a rollback) writes nothing./releases.jsonanswers a guest; an admin reaches the handlers unchanged.Files: test/admin-gate.test.ts only.
Before pushing:
bun x tsc --noEmitand the tests you add or touch;bun scripts/design-lint.tsif src/web/ changes. Small and single-purpose; tests never read the wall clock — passnowin.