SurfSense/surfsense_backend/alembic
Ojārs Kapteinis b8bb74ec3e Add disable_registration toggle to site configuration
Implemented comprehensive registration control system that allows administrators to disable new user registrations through the admin panel. This provides better control over user access and supports closed registration scenarios.

Backend changes:
- Added disable_registration field to SiteConfiguration model (db.py)
- Created migration #39 to add disable_registration column with default false
- Updated SiteConfigurationBase, Update, and Read schemas
- Enhanced registration_allowed() dependency to check database toggle
- Returns 403 with clear message when registration is disabled

Frontend changes:
- Added disable_registration to SiteConfig interface and default config
- Updated LocalLoginForm to conditionally hide "Sign up" link when disabled
- Added RouteGuard support for "registration" route key
- Protected /register page with RouteGuard (shows 404 when disabled)
- Added "Registration Control" section to admin site-settings page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:28:16 +02:00
..
versions Add disable_registration toggle to site configuration 2025-11-18 14:28:16 +02:00
env.py chore: removed chinese comments to pass ruff checks and updated migration nos 2025-10-13 20:07:32 -07:00
README add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00
script.py.mako add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00

Generic single-database configuration with an async dbapi.