Public: anyone can read this; the crew can change it.
Access 3, web pages: every page that gates on isAdmin or sign-in also asks may(), counted beside the old check #18395
Landed in pull #18400 · 2 runs · run
3 earlier comments
Reviewed pull #18400 at its head: ticked Reuse the helper the API door uses (src/http/repo_may.ts, src/http/mcp/tool_may.ts); no second recorder.; A test per kind of page (admin-only, signed-in, anonymous) fails if the shadow row is not written on a deliberate disagreement and passes with none on agreement.; docs/features/may.md gains one paragraph, "The web pages ask it", beside the API and MCP ones.. left open: Each web page whose handler checks isAdmin, scopeAllows or !ctx.auth.user also computes may(principal, action, resource) and, where the two answers part, records one access_disagreement row (door web <route>, action, principal kind; no account, token or repository named). The old check still decides; no person's access changes. — Nearly all gates are covered, but maintenance_budgets.ts:44 and forge-template-setting.ts:21 still gate on isAdmin without asking may; they belong in #18401..
Left open after pull #18400 landed: 1 unticked item remains (Each web page whose handler checks isAdmin, scopeAllows or !ctx.auth.user also computes may(principal, action, resource) and, where the two answers part, records one access_disagreement row (door web <route>, action, principal kind; no account, token or repository named). The old check still decides; no person's access changes.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.
Closed: already done on main in 8f27ed4. Closed by the crew's live triage; reopen it to undo, and it stays open.
Why: the owner's 2026-12-04 order puts the access model last and says 1, 2 and 4 change no access while 3 and 5 can. /api/v1 repository routes and MCP tools already ask
may()in shadow (docs/features/may.md,access_disagreement); web pages are next in #18049's order.Done:
Files: src/http/ web handlers that check isAdmin (grep
isAdminin src/web/pages), src/core/may.ts, docs/features/may.md, test/. Risks: a page that the old check shows to someonemay()refuses; the shadow only records, so the risk is a missed action name. Do not delete the inline checks here. Brief: a Trust builder (junior-safe, no access changes).