cd llm_be && uv run python manage.py test chat_backend.tests.test_views_users
Confirm POST /api/user/create/ returns 403 when flag unset/false
With ENABLE_ACCOUNT_REGISTRATION=true, register returns access/refresh + creates company
GET /api/public/settings/ returns the flag
Add ENABLE_ACCOUNT_REGISTRATION=false to control-node chat_backend_prod.env / chat_backend_beta.env before deploy (see .env.prod.example)
## Summary
- Add `ENABLE_ACCOUNT_REGISTRATION` (default `false`) for self-serve sign-up, set via env / control-node secret (`chat_backend_<env>.env`)
- Harden `POST /api/user/create/` to create company + user, return JWTs, and reject when the flag is off
- Expose `GET /api/public/settings/` with `enable_account_registration` for the SPA
Supports frontend: [chat_web_app#31](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/31)
## Test plan
- [ ] `cd llm_be && uv run python manage.py test chat_backend.tests.test_views_users`
- [ ] Confirm `POST /api/user/create/` returns 403 when flag unset/false
- [ ] With `ENABLE_ACCOUNT_REGISTRATION=true`, register returns access/refresh + creates company
- [ ] `GET /api/public/settings/` returns the flag
- [ ] Add `ENABLE_ACCOUNT_REGISTRATION=false` to control-node `chat_backend_prod.env` / `chat_backend_beta.env` before deploy (see `.env.prod.example`)
Supports chat_web_app#31: public settings + /user/create/ create company/user and return JWTs for Stripe Checkout. Document flag in env/secret templates.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
ENABLE_ACCOUNT_REGISTRATION(defaultfalse) for self-serve sign-up, set via env / control-node secret (chat_backend_<env>.env)POST /api/user/create/to create company + user, return JWTs, and reject when the flag is offGET /api/public/settings/withenable_account_registrationfor the SPASupports frontend: chat_web_app#31
Test plan
cd llm_be && uv run python manage.py test chat_backend.tests.test_views_usersPOST /api/user/create/returns 403 when flag unset/falseENABLE_ACCOUNT_REGISTRATION=true, register returns access/refresh + creates companyGET /api/public/settings/returns the flagENABLE_ACCOUNT_REGISTRATION=falseto control-nodechat_backend_prod.env/chat_backend_beta.envbefore deploy (see.env.prod.example)