Add env-configurable option to disable public signups
This PR adds a simple single-tenant (“no public signup”) mode controlled by the SINGLE_TENANT environment variable.
When SINGLE_TENANT=true and at least one user already exists(similarly to once-campfire):
- /signup/new redirects to the login page instead of showing the signup form.
- /session/new no longer allows creating new accounts.
To avoid exposing whether an email exists, the page always displays the generic message: “Check your inbox if your email belongs to an existing account.”
https://github.com/user-attachments/assets/195c33f0-c179-4938-b8af-b97b2fe40ab3
@kevinmcconnell Thanks for the suggestions, they were spot-on, I’ve applied all of them.
Now MULTI_TENANT is true by default, otherwise some tests would break.
Thanks again @harisadam. I've made a few more small changes, and I'll get this shipped shortly!