Add ability to disable user registration through environment variable#726
Open
askadityapandey wants to merge 8 commits intoimplerhq:nextfrom
Open
Add ability to disable user registration through environment variable#726askadityapandey wants to merge 8 commits intoimplerhq:nextfrom
askadityapandey wants to merge 8 commits intoimplerhq:nextfrom
Conversation
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Member
|
Thanks, @askadityapandey Awesome work! Everything seems fine, will review it today. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 47861e6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
Member
|
@askadityapandey Can you check here, https://github.com/implerhq/impler.io/actions/runs/10229623025/job/28387118233?pr=726#step:7:339 due to some linting issues, build is failing. Can you update it? |
Signed-off-by: Bhavik Chavda <bhavikvchavda@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Signed-off-by: Aditya Pandey <askadityapandey@gmail.com>
Author
|
Hey @chavda-bhavik , see if it's fine now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to disable user registration through an environment variable
DISABLE_USER_REGISTRATION. If this variable is set totrue, the registration endpoint will return a403 Forbiddenstatus, preventing new users from signing up. This feature can be useful for instances where user registration needs to be temporarily or permanently disabled.Changes:
API Controller (
auth.controller.ts):DISABLE_USER_REGISTRATIONin theregistermethod to prevent user registration if the variable is set totrue.Environment Validator (
env-validator.ts):DISABLE_USER_REGISTRATIONenvironment variable to ensure it is correctly handled.Docker Compose (
docker-compose.yml):DISABLE_USER_REGISTRATIONto theenvironmentsection to allow configuration of the variable in self-hosted deployments.Also The project is cool, will look forward to contribute more <3
Fixes #724