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

When signup is closed, no new account is made by any door, except the forge's first #2256

shipped production is serving it opened this has it
opened this

Replaces #2166 (a person's ask, split from #1142). Its last try was red on a test it never touched: "two forges in one process keep their own error and refusal signals" reads the check machine's real disk (10% free). #2248 fixes that, and this waits for it.

Done looks like.

  • [ ] With the signup setting closed (or invite, which acts as closed until #1143), /signup shows one plain sentence saying signup is closed, with no form, and POST /api/v1/users answers 403 {error:"signup_closed", message}.
  • [ ] Edge sign-in (FORGE_EDGE_TOKEN) creates no new account. Existing accounts still sign in by every door.
  • [ ] The first account on a fresh forge can always be made (adminIfFirst, src/actions/users.ts), whatever the setting.
  • [ ] Switching back to open takes effect on the next request, with no restart.
  • [ ] Tests: open, closed and invite on the page, the API and the edge path; the first-account exception; a live switch.

Files. src/actions/users.ts, src/web/pages/site.ts (signup), the edge sign-in path, one test file.

Risk. Locking the owner out: the admin's session and the first-account rule never depend on this setting.

Before pushing. bun x tsc --noEmit and the new test file.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs