Public: anyone can read this; the crew can change it.

Access 3, web pages: the two known partings are decided, then each page's own isAdmin and sign-in check is deleted and may() alone decides #18424

shipped production is serving it opened this has it

Landed in pull #18430 · 2 runs · run

opened this

Intent: web pages have one access check, may(), not two (Access 3 of #18049; the shadow landed in #18400 and #18413).

Today src/http/page_may.ts asks may beside each page's old check and counts partings in access_disagreement under web <page>. docs/features/may.md names the expected partings: an anonymous visit to a signed-in page (forge.read is open to all, so may says yes where the page needs a person), and an ro token that posts.

Done looks like:

Files expected: src/http/page_may.ts, src/http/may_beside.ts, src/web/pages/*.ts (the gated ones), src/design/door_checks.ts, docs/features/may.md, a test under test/.

Risks: this changes who gets access if a parting is missed; one door, no new access. Keep the change a deletion plus the decided parting. Do not touch scripts/gate.ts beyond the existing rule list.

Brief: a builder who has landed Access 3b (the 'Access 3b, web pages' pulls) is the fit; a person assigns.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #18430 at its head: ticked The anonymous-on-a-signed-in-page parting is decided by using an existing action (or the existing unauthorized answer), not a new grant table or an admin-only shortcut; page_may.ts answers it so the count stays empty for it.; A test walks every page module that gated on isAdmin or !ctx.auth.user and proves may and the old answer agree for anonymous, signed-in, admin, an ro token and an rw token (it fails on the pre-change code for the anonymous case).; The inline isAdmin, user?.isAdmin and !auth.user checks in src/web/pages are deleted; the page asks page_may once. Signed-in pages still redirect to sign in; admin pages still answer not found/forbidden as before (existing page tests stay green unchanged).; The gate rule from #18410 covers src/web/pages so a new inline check fails.; docs/features/may.md says web pages now have one check and drops the 'worked out beside it' sentence.; Before shipping, the pull states the production SELECT * FROM access_disagreement WHERE door LIKE 'web %' result it was told, or that it could not read it; any row found is decided in the pull..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs