feat: Change default registration mode to public
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
- Updated default REGISTRATION_MODE from 'invite_only' to 'public' - Applied to both auth.controller.ts and auth.service.ts - Added REGISTRATION_MODE and REQUIRE_INVITE_CODE to .env file - System now defaults to open registration unless explicitly configured Note: Admins can still switch to invite-only mode via the admin dashboard settings page (functionality to persist settings coming soon). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export class AuthController {
|
||||
@Get('registration/config')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async getRegistrationConfig() {
|
||||
const registrationMode = this.configService.get<string>('REGISTRATION_MODE', 'invite_only');
|
||||
const registrationMode = this.configService.get<string>('REGISTRATION_MODE', 'public');
|
||||
const requireInviteCode = registrationMode === 'invite_only';
|
||||
|
||||
return {
|
||||
|
||||
@@ -55,7 +55,7 @@ export class AuthService {
|
||||
|
||||
async register(registerDto: RegisterDto): Promise<AuthResponse> {
|
||||
// Check registration mode and validate invite code if required
|
||||
const registrationMode = this.configService.get<string>('REGISTRATION_MODE', 'invite_only');
|
||||
const registrationMode = this.configService.get<string>('REGISTRATION_MODE', 'public');
|
||||
const requireInviteCode = registrationMode === 'invite_only';
|
||||
|
||||
let validatedInviteCode: InviteCode | null = null;
|
||||
|
||||
Reference in New Issue
Block a user