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.
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.
signupsettingclosed(orinvite, which acts as closed until #1143),/signupshows one plain sentence saying signup is closed, with no form, andPOST /api/v1/usersanswers 403{error:"signup_closed", message}.FORGE_EDGE_TOKEN) creates no new account. Existing accounts still sign in by every door.adminIfFirst, src/actions/users.ts), whatever the setting.opentakes effect on the next request, with no restart.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 --noEmitand the new test file.