mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
Resolve all 5 deferred items from Epic 5 adversarial code review: - Migration 124: Add CASCADE to subscriptionstatus enum drop (prevent orphaned references) - Stripe rate limiting: In-memory per-user limiter (20 calls/60s) on verify-checkout-session - Subscription request cooldown: 24h cooldown before resubmitting rejected requests - Token reset date: Initialize on first subscription activation - Checkout URL validation: Confirmed HTTPS-only (Stripe always returns HTTPS) Implement Story 5.4 (Usage Tracking & Rate Limit Enforcement): - Page quota pre-check at HTTP upload layer - Extend UserRead schema with token quota fields - Frontend 402 error handling in document upload - Quota indicator in dashboard sidebar Story 5.5 (Admin Seed & Approval Flow): - Seed admin user migration with default credentials warning - Subscription approval/rejection routes with admin guard - 24h rejection cooldown enforcement Story 5.6 (Admin-Only Model Config): - Global model config visible across all search spaces - Per-search-space model configs with user access control - Superuser CRUD for global configs Additional fixes from code review: - PageLimitService: PAST_DUE subscriptions enforce free-tier limits - TokenQuotaService: PAST_DUE subscriptions enforce free-tier limits - Config routes: Fixed user_id.is_(None) filter on mutation endpoints - Stripe webhook: Added guard against silent plan downgrade on unrecognized price_id All changes formatted with Ruff (Python) and Biome (TypeScript). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| airtable_auth_credentials.py | ||
| atlassian_auth_credentials.py | ||
| auth.py | ||
| base.py | ||
| chat_comments.py | ||
| chat_session_state.py | ||
| chunks.py | ||
| clickup_auth_credentials.py | ||
| discord_auth_credentials.py | ||
| documents.py | ||
| folders.py | ||
| google_drive.py | ||
| image_generation.py | ||
| incentive_tasks.py | ||
| linear_auth_credentials.py | ||
| logs.py | ||
| new_chat.py | ||
| new_llm_config.py | ||
| notion_auth_credentials.py | ||
| obsidian_auth_credentials.py | ||
| onedrive_auth_credentials.py | ||
| podcasts.py | ||
| prompts.py | ||
| rbac_schemas.py | ||
| reports.py | ||
| search_source_connector.py | ||
| search_space.py | ||
| slack_auth_credentials.py | ||
| stripe.py | ||
| surfsense_docs.py | ||
| teams_auth_credentials.py | ||
| users.py | ||
| video_presentations.py | ||
| vision_llm.py | ||