Add global registration disable feature
Implement configurable registration control to allow administrators to disable new user signups. Backend changes: - Add fitpub.registration.enabled configuration property (defaults to true) - Update AuthController to check registration status and return 403 Forbidden when disabled - Create GET /api/auth/registration-status endpoint to expose registration status to frontend - Add RegistrationStatusResponse DTO Configuration changes: - Add REGISTRATION_ENABLED environment variable to application.yml - Add REGISTRATION_ENABLED to Dockerfile with default value of true - Update .env.example with REGISTRATION_ENABLED documentation Frontend changes: - Update registration page to check status and hide form when disabled - Add checkRegistrationStatus() to auth.js to dynamically hide registration links - Display user-friendly message when registration is disabled To disable registration, set environment variable: REGISTRATION_ENABLED=false 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0732774986
commit
bc6741a749
6 changed files with 82 additions and 1 deletions
|
|
@ -62,6 +62,10 @@ fitpub:
|
|||
secret: ${JWT_SECRET:change-this-secret-key-in-production-must-be-at-least-32-characters-long}
|
||||
expiration: 86400000 # 24 hours in milliseconds
|
||||
|
||||
# Registration settings
|
||||
registration:
|
||||
enabled: ${REGISTRATION_ENABLED:true}
|
||||
|
||||
# Storage settings
|
||||
storage:
|
||||
fit-files:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue