Gate self-serve registration behind ENABLE_ACCOUNT_REGISTRATION #25

Merged
westfarn merged 1 commits from feature/signup-registration-flag-31 into master 2026-07-27 04:19:59 -07:00
Owner

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

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)
## 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`)
westfarn added 1 commit 2026-07-27 04:18:03 -07:00
Gate self-serve registration behind ENABLE_ACCOUNT_REGISTRATION (default false).
CI / test (pull_request) Successful in 10s
Unit Tests / test (pull_request) Successful in 10s
6e34fd95ec
Supports chat_web_app#31: public settings + /user/create/ create company/user and return JWTs for Stripe Checkout. Document flag in env/secret templates.
westfarn merged commit 30ce3d048d into master 2026-07-27 04:19:59 -07:00
westfarn deleted branch feature/signup-registration-flag-31 2026-07-27 04:20:00 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_backend#25