9 Commits

Author SHA1 Message Date
Somoru
883ca1ffc8 refactor: migrate multi-user to use existing user_data table
- Update migration to extend user_data table instead of creating new users table
- Refactor user_management service to work with tmpID (INTEGER) primary key
- Update login.ts to support multi-user authentication with user_data
- Fix auth.ts middleware to use new user management API
- Update API routes to handle tmpID-based user identification
- Store userId as number in session for consistency

This integrates with Trilium's existing OAuth user_data table (v229) and
maintains backward compatibility with single-user installations.
2025-10-21 14:33:37 +05:30
Somoru
6faa197671 feat: add multi-user support (issue #4956)
- Add database migration v234 for multi-user schema
- Implement users, roles, user_roles, and note_shares tables
- Add user management service with CRUD operations
- Implement role-based permission system (Admin/Editor/Reader)
- Add RESTful user management API endpoints
- Update login flow to support username + password authentication
- Maintain backward compatibility with legacy password-only login
- Create default admin user from existing credentials during migration
- Add session management for multi-user authentication
- Include TypeScript type definitions for Node.js globals

Tests: 948 passed | 17 skipped (965 total)
Build: Successful (server and client)
TypeScript: Zero errors
2025-10-21 11:51:44 +05:30
Judging28
c79c21e965 (fix)check redirectBareDomain option first 2025-09-12 23:49:32 +08:00
hulmgulm
21504d1417 Logout same error message on api 401 as on login error 2025-08-25 21:18:01 +02:00
Elian Doran
091cd7a18a
fix(server): totp asked even if no authentication is enabled 2025-06-06 16:17:21 +03:00
Elian Doran
63a6f00a47
chore(server): add logs to debug missing session 2025-06-06 09:27:51 +03:00
Elian Doran
b2af043110
chore(nx/server): move source code 2025-04-22 17:16:41 +03:00
Elian Doran
62dbcc0a2e
chore(nx): move all monorepo-style in subfolder for processing 2025-04-22 10:06:06 +03:00
Elian Doran
5058891af8
chore(monorepo/server): move server-side source code 2025-04-18 12:09:56 +03:00