Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to DISABLE_USER_REGISTRATION #724

Open
chavda-bhavik opened this issue Jul 31, 2024 · 1 comment · May be fixed by #726
Open

Ability to DISABLE_USER_REGISTRATION #724

chavda-bhavik opened this issue Jul 31, 2024 · 1 comment · May be fixed by #726
Labels

Comments

@chavda-bhavik
Copy link
Member

Is your feature request related to a problem? Please describe.
If there is DISABLE_USER_REGISTRATION in env no one should be able to do signup. By signup form or using github signup.

Describe the solution you'd like
If env has DISABLE_USER_REGISTRATION set to true, user should not be able to signup. We will restrict signup request from API side by adding check to DISABLE_USER_REGISTRATION env.

Like following condition we can put into,

async register(@Body() body: RegisterUserDto, @Res() response: Response) {
,

    if (process.env.DISABLE_USER_REGISTRATION === 'true') throw new ApiException('Account creation is disabled');

Describe alternatives you've considered

Additional context

@chavda-bhavik
Copy link
Member Author

Assigning to @askadityapandey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant