cal.com
cal.com copied to clipboard
disables signups via env variable
What does this PR do?
Adds a new environment variable that disables signups:
- remove link on login page
- returns a 404 for /signup
- returns a 403 for /api/auth/signup
Fixes #6192
Environment: Staging(main branch)
Type of change
- [x] New feature (non-breaking change which adds functionality)
How should this be tested?
- [ ] set env var
NEXT_PUBLIC_DISABLE_SIGNUPto true - [ ] ensure signup link is disabled
- [ ] ensure visiting /signup returns a 404
- [ ] ensure trying to make a new user via /api/auth/signup fails
Checklist
- I haven't added tests that prove my fix is effective or that my feature works
@phishy is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
we don't wanna overload our .env, instead we're moving most modification settings to a database entry
Yeah I saw you hit the 4K AWS limit, and the config table is in RFC. Is that right?
Yeah I saw you hit the 4K AWS limit, and the config table is in RFC. Is that right?
correct, in general its a much better UX to have a config table + UI + admin manager to make non-code changes to the product than having a convoluted .env file
Yeah I saw you hit the 4K AWS limit, and the config table is in RFC. Is that right?
correct, in general its a much better UX to have a config table + UI + admin manager to make non-code changes to the product than having a convoluted .env file
Agreed. Env is for secrets.
@phishy What's the status of this request?
@ojengwa its currently blocked because we dont want to overload .env.
however, the database implementation is a few weeks away, @zomars should we merge this and later move the .env to a database / admin setup?
@PeerRich I understand you might be having issues with your env size, but this feature should be opt-in, meaning you should not need to change your env variables in order to keep the app working as is.
Only users intending to block signups should need to add NEXT_PUBLIC_DISABLE_SIGNUP to their envs.
Thus, in my point of view, I don't see why this is blocked.
we will likely end up merging this and later extract this setting into an admin database @zomars @joeauyeung