3x-ui/database
Sora39831 5f83415e95 feat: add user registration with role-based access
- Add Role field to User model (admin/user) with uniqueIndex on Username
- Add POST /register endpoint with optional Cloudflare Turnstile verification
- Add RegisterUser service with bcrypt password hashing and duplicate detection
- Set default admin user role to "admin", new registrations get "user"
- Add turnstileSecretKey setting and GetTurnstileSecretKey getter
- Add i18n keys (userExists, errorRegister) to all 13 translation files
2026-04-02 23:49:30 +08:00
..
model feat: add user registration with role-based access 2026-04-02 23:49:30 +08:00
db.go feat: add user registration with role-based access 2026-04-02 23:49:30 +08:00