SurfSense/surfsense_backend/app/schemas
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
..
__init__.py Implemented serverside pagination; 2025-10-01 13:05:22 -07:00
airtable_auth_credentials.py update airtable indexer 2025-08-26 19:17:46 +02:00
base.py Fixed all ruff lint and formatting errors 2025-07-24 14:43:48 -07:00
chats.py implement chat/podcast staleness 2025-11-06 21:52:45 +02:00
chunks.py Fixed all ruff lint and formatting errors 2025-07-24 14:43:48 -07:00
documents.py chore: biome & ruff checks 2025-10-01 18:50:36 -07:00
google_auth_credentials.py refresh the token when expired 2025-08-21 01:09:13 +02:00
llm_config.py feat: added global llm configurations 2025-11-14 21:53:46 -08:00
logs.py Fixed all ruff lint and formatting errors 2025-07-24 14:43:48 -07:00
podcasts.py inject user instruction in the podcast generation task 2025-11-11 20:08:32 +02:00
search_source_connector.py feat: added periodic tasks in backend db and frontend hooks 2025-10-22 16:14:25 -07:00
search_space.py feat: moved LLMConfigs from User to SearchSpaces 2025-10-10 00:50:29 -07:00
site_configuration.py Add disable_registration toggle to site configuration 2025-11-18 14:28:16 +02:00
social_media_links.py Implement dynamic social media link management system 2025-11-17 20:44:17 +00:00
users.py chore: Updated UserRead schema to include pages_limit and pages_used fields 2025-11-03 22:34:37 -08:00