-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(signup): allow to block signup #3209
feat(signup): allow to block signup #3209
Conversation
CLA
Hello there and welcome to our project! |
Oh yes good catch on the inviteHash, forgot to mention that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is a great initiative.
I believe we also have some work on the frontend. Could you pass this environment variable value through ClientConfig. You will be able to get it in the frontend, store it in a recoilstate and use it in PageChangeEffect to prevent any user to access /sign-up route with no workspaceHash (you should redirect to /sign-in in this case)
packages/twenty-docs/docs/start/self-hosting/enviroment-variables.mdx
Outdated
Show resolved
Hide resolved
Hey there! 👋 Finally went through all of this GraphQL thing and was able to complete the frontend part. CleanShot.2024-01-05.at.21.36.27.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm taking a final look and will merge it this morning :)
packages/twenty-docs/docs/start/self-hosting/environment-variables.mdx
Outdated
Show resolved
Hide resolved
@arthureichelberger I have tested all cases and I have actually removed the override of checkUserExists in case of disabled sign up. This is preventing users to be added through inviteLink. I feel the frontend approach is better now that we have it. |
fixes #3201.
I assumed that the flow would look like this; you start with the signup being enabled (which is the default value if the environment variable is not set), you first register to create the owner account/workspace and then, when you are done, you can now disable the registration of new users. There is still an exception; users who have a workspaceInviteHash are free to enter.