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

Access 3b, web pages: the remaining admin gates (a local user?.isAdmin, isAdmin !== true || agent) ask adminPage beside them #18413

opened this

Merged 2h ago, live in production

Almost all of the gates this issue listed were already wrapped on main when I started. I wrapped the one admin gate that wasn't and added a test for it.

Notes

opened this

Almost all of the gates this issue listed were already wrapped on main when I started. I wrapped the one admin gate that wasn't and added a test for it. The pushed change touches one line in src/web/pages/everyday.ts; I ran tsc, test/web-pages-may.test.ts, test/door-inline-checks.test.ts and gate.ts --fix, and all passed. I did not run the full suite.

What changed

  • everydayPage (GET /settings/everyday) now asks adminPage(ctx, "everyday", user.isAdmin) in its admin check. The old answer still decides, so || short-circuits exactly as before. A parting with may is counted in access_disagreement under web everyday.
  • test/web-pages-may.test.ts has one new test. It checks that the everyday gate goes through adminPage, and that billing's soldSection does not.

Already done on main

  • Every other module the issue named already calls adminPage: forges, forge_machine, forge_upgrade, billing, packs, admin-limits, economics, visitors, forge_move_in, boards*, flows-all, teams, runners, telemetry and trusted.

What I left alone

  • Billing's soldSection and portalSection show or hide a block. They sit inside a page that is already gated, and asking again would count each parting twice. This matches the existing backups.ts rule and its test.
  • everydayToAdmin checks adminOf(daily).isAdmin. The person acting there is the everyday account, not the admin, so asking forge.administer of that principal would part on every request.
  • The user.isAdmin && user.kind === "user" check in everyday.ts and the display-only isAdmin reads are not gates.

Doors: no terminal or docs/features/ change, since nothing a page shows or does changed. The commit says No door.

To try it: sign in as the admin and open /settings/everyday. It still shows the step. A non-admin is still sent to /settings. Look path: /settings/everyday.

🤖 Generated with Claude Code

Closes #18401

commented

Almost all of the gates this issue listed were already wrapped on main when I started. I wrapped the one admin gate that wasn't and added a test for it. The pushed change touches one line in src/web/pages/everyday.ts; I ran tsc, test/web-pages-may.test.ts, test/door-inline-checks.test.ts and gate.ts --fix, and all passed. I did not run the full suite.

What changed

  • everydayPage (GET /settings/everyday) now asks adminPage(ctx, "everyday", user.isAdmin) in its admin check. The old answer still decides, so || short-circuits exactly as before. A parting with may is counted in access_disagreement under web everyday.
  • test/web-pages-may.test.ts has one new test. It checks that the everyday gate goes through adminPage, and that billing's soldSection does not.

Already done on main

  • Every other module the issue named already calls adminPage: forges, forge_machine, forge_upgrade, billing, packs, admin-limits, economics, visitors, forge_move_in, boards*, flows-all, teams, runners, telemetry and trusted.

What I left alone

  • Billing's soldSection and portalSection show or hide a block. They sit inside a page that is already gated, and asking again would count each parting twice. This matches the existing backups.ts rule and its test.
  • everydayToAdmin checks adminOf(daily).isAdmin. The person acting there is the everyday account, not the admin, so asking forge.administer of that principal would part on every request.
  • The user.isAdmin && user.kind === "user" check in everyday.ts and the display-only isAdmin reads are not gates.

Doors: no terminal or docs/features/ change, since nothing a page shows or does changed. The commit says No door.

To try it: sign in as the admin and open /settings/everyday. It still shows the step. A non-admin is still sent to /settings. Look path: /settings/everyday.

🤖 Generated with Claude Code

commented

<!-- look-pages 42f8c638f69d --> Look pages for 42f8c63, from the gate:

  • look pages (none): "Looks: /settings/everyday" is not a page of app.looks in forge.json; this pull changes src/web/pages/everyday.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
Sign in to join this conversation.

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

Keyboard shortcuts

Docs