feat(signup): allow to block signup (#3209)
* feat(signup): allow to block signup * feat(signup): update environment variable documentation * test: update auth service tests * feat(signup): prevent user from reaching out the sign up page * Fix lint * Fixes --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
committed by
GitHub
parent
66a054ac21
commit
c6ae480856
@ -244,4 +244,8 @@ export class EnvironmentService {
|
||||
getOpenRouterApiKey(): string | undefined {
|
||||
return this.configService.get<string | undefined>('OPENROUTER_API_KEY');
|
||||
}
|
||||
|
||||
isSignUpDisabled(): boolean {
|
||||
return this.configService.get<boolean>('IS_SIGN_UP_DISABLED') ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,6 +170,11 @@ export class EnvironmentVariables {
|
||||
)
|
||||
@IsString()
|
||||
SENTRY_DSN?: string;
|
||||
|
||||
@CastToBoolean()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
IS_SIGN_UP_DISABLED?: boolean;
|
||||
}
|
||||
|
||||
export const validate = (config: Record<string, unknown>) => {
|
||||
|
||||
Reference in New Issue
Block a user