-
Notifications
You must be signed in to change notification settings - Fork 899
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
Add configuration to disable user registration #947
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
Hey Matt. Thanks a lot! |
@like-a-bause Added in an e2e test for the nosignup flow. Ready for re-review! |
Hi @irby, thanks! LGTM, will merge now. |
Thanks @irby - awesome work. |
/tip $150 @irby |
@irby: You just got a $150 tip! 👉 Complete your Algora onboarding to collect your payment. |
Hi @FlxMgdnz , thank you very much for the tip! Greatly appreciated. I've created an Algora account. How do I collect the tip? |
Hey - you're welcome. You would have to create an account at Algora, which I can only recommend. |
🎉🎈 @irby has been awarded $150! 🎈🎊 |
Description
Work to address #911, add configuration to disable user signup functionality. By default, users will be able to signup. If
account.allow_signup
is set tofalse
within the configuration, it will not allow users to register from the frontend or by calling the user create API.Implementation
Added a new bool value to the configuration in the backend called
AllowSignup
that will betrue
by default.On the backend, I added a check in the user create endpoint to check whether this config value is set to false. If so, it will return a 403 Forbidden response.
On the frontend, added a new page for when an account does not exist. This page does not include a button to register, it will only allow users to navigate back to the login screen. Users will only be redirected to this new screen if the config disallows user signups.
Tests
Added a test in the backend to verify that account creation is forbidden if
account.allow_signup
is disabled in the configuration. On the frontend side, I ran the application locally to verify new site behavior of signup is disabled. I could create an e2e test to test site navigation in an automated fashion, please let me know if I have authorization to update the GitHub action.Todos
N/A
Additional context
N/A
Screenshots