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>
41 lines
950 B
Text
41 lines
950 B
Text
# PostgreSQL Database Configuration
|
|
POSTGRES_DB=fitpub
|
|
POSTGRES_USER=fitpub
|
|
POSTGRES_PASSWORD=change_me_in_production
|
|
POSTGRES_PORT=5432
|
|
|
|
# Application Configuration
|
|
APP_PORT=8080
|
|
SPRING_PROFILES_ACTIVE=prod
|
|
|
|
# Domain and URL Configuration
|
|
APP_DOMAIN=example.com
|
|
APP_BASE_URL=https://example.com
|
|
|
|
# Security Configuration
|
|
# Generate a secure random string for JWT_SECRET in production
|
|
# Example: openssl rand -base64 64
|
|
JWT_SECRET=change_me_to_a_secure_random_string_in_production
|
|
JWT_EXPIRATION_MS=86400000
|
|
|
|
# Registration Configuration
|
|
# Set to false to disable user registration
|
|
REGISTRATION_ENABLED=true
|
|
|
|
# ActivityPub Configuration
|
|
ACTIVITYPUB_ENABLED=true
|
|
|
|
# File Upload Configuration
|
|
FILE_UPLOAD_MAX_SIZE=50MB
|
|
FILE_UPLOAD_DIR=/app/uploads
|
|
|
|
# Logging Configuration
|
|
LOG_LEVEL_ROOT=INFO
|
|
LOG_LEVEL_APP=INFO
|
|
LOG_LEVEL_SPRING=INFO
|
|
LOG_LEVEL_HIBERNATE=WARN
|
|
LOG_LEVEL_FLYWAY=INFO
|
|
|
|
# JPA/Hibernate Configuration
|
|
JPA_SHOW_SQL=false
|
|
JPA_FORMAT_SQL=false
|