feat(lr-ec2d): remove single-user mode — backend and migration (PR 1 of 3)#259
Merged
Conversation
…of 3) - Remove single-user PIN auth endpoint and all dead code (generateAuthToken, verifyPin, isAuthed, setAuthToken, pinPage) - isRequestAuthed() now always delegates to isMultiUserAuthed() - Remove all !isMultiUser() branches in server-settings.js, server-admin.js, server.js (404 guards, profile.json fallbacks, enable-multiuser endpoint) - isMultiUser() retained as stub returning true in users-auth.js/users.js; full removal in PR 2 - daemon.js: add migrateSingleUserToMultiUser() — runs at startup, detects multiUser:false, creates admin stub with setupCode, atomic sync write, prints prominent banner with direct setup URL - users.js: saveUsers() now writes synchronously before async store queue, so findUserById() reads back the user immediately after createUser() - pages.js: remove pinPageHtml() - test/single-user-migration.test.js: new — covers all 3 migration cases plus idempotency and synchronous write guarantee - test/boot-smoke-lr-1a5f.test.js: updated for multi-user boot flow — pre-seeds users.json with setupCode, authenticates via /auth/setup, hits /info with auth cookie - test/security.test.js: remove single-user mode test cases - docs/specs/lr-ec2d-single-user-removal.md: full implementation spec Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.