From 4c699b86ef6ef62741777d91573bda8fa81daa0b Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 15 Sep 2026 03:18:57 +0200 Subject: [PATCH] feat: local registration is closed for good, and its on/off switch is gone Every account comes through One Sign In; an administrator sends an invitation link from there. The register route answers 410, the registration-status route and the admin toggle are removed, and the setting no longer exists in defaults, lockdown lists or seeds. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016fZGJNyDvERbMgS2Uc2msP --- e2e/seed.js | 4 +- e2e/tests/auth-screen.spec.js | 11 ---- public/components/admin.html | 10 ---- public/js/admin.js | 35 +------------ public/js/auth.js | 11 +--- public/js/authFetch.js | 2 +- src/db/database.js | 2 - src/routes/admin.js | 21 +------- src/routes/adminConfig.js | 3 +- src/routes/auth.js | 94 ++-------------------------------- src/utils/adminLockdown.js | 1 - src/utils/openapiRoutes.js | 9 +--- test/backend-hardening.test.js | 2 +- test/openapi.test.js | 6 +-- test/policy-flows.test.js | 11 ++-- 15 files changed, 21 insertions(+), 201 deletions(-) diff --git a/e2e/seed.js b/e2e/seed.js index 9361ceab..ecd32f4a 100644 --- a/e2e/seed.js +++ b/e2e/seed.js @@ -69,9 +69,7 @@ var SETTINGS = { 'models.disabled': '[]', 'stt.model': 'e2e-stt', 'tts.model': 'e2e-tts', - 'tts.voice': 'e2e-voice', - // Registration open, so the auth-screen spec can see the register link. - 'registration_enabled': 'true' + 'tts.voice': 'e2e-voice' }; async function seedSettings() { diff --git a/e2e/tests/auth-screen.spec.js b/e2e/tests/auth-screen.spec.js index dc395082..18b7fa0e 100644 --- a/e2e/tests/auth-screen.spec.js +++ b/e2e/tests/auth-screen.spec.js @@ -41,17 +41,6 @@ test.describe('Unauthenticated auth screen', () => { await expect(page.locator('#btn-local-login')).toBeVisible(); }); - test('the register link follows the registration setting', async ({ page }) => { - // Hidden by default and shown only when registration is enabled, which the - // seed turns on. No invitation field: invitations are the SSO's. - await page.goto(E2E_BASE + '/'); - await page.waitForSelector('#auth-screen', { timeout: 10000 }); - await expect(page.locator('#show-register')).toBeVisible(); - await expect(page.locator('#register-form')).toHaveCount(1); - await page.click('#show-register'); - await expect(page.locator('#reg-invite')).toHaveCount(0); - }); - test('register form DOM is wired correctly if manually unhidden', async ({ page }) => { await page.goto(E2E_BASE + '/'); await page.waitForSelector('#auth-screen', { timeout: 10000 }); diff --git a/public/components/admin.html b/public/components/admin.html index d87360e6..6f55f744 100644 --- a/public/components/admin.html +++ b/public/components/admin.html @@ -22,16 +22,6 @@ -
-

Registration

-
-
- Loading... - -
- -
-