memos/server
Steven 8f136ffa75 fix(api): correct user registration logic and first-user detection
- Changed first-user detection to check for any users instead of only HOST users
- Moved registration setting check before role assignment to properly block unauthorized registrations
- Fixed role assignment logic to ensure unauthenticated users always get USER role
- Updated test cases to create host user first when not testing first-user scenario

This ensures the first user is always created as HOST and registration settings are properly enforced for subsequent user creation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 23:41:47 +08:00
..
profiler chore: fix linter 2025-05-27 23:22:32 +08:00
router fix(api): correct user registration logic and first-user detection 2025-11-06 23:41:47 +08:00
runner refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00
server.go refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00