modcomms/backend/app/api
michael d21036a0de Add 4-tier RBAC backend: auth dependencies, role enforcement, agency filtering
- Add CHECK constraint migration for users.role (super_admin, oversight_admin, agency_admin, basic_user)
- Add get_current_db_user dependency resolving Azure claims to User ORM with agency
- Add require_role() factory and require_write_access() dependency
- Auto-promote dev user to super_admin when DISABLE_AUTH=true
- Add /api/me, PUT /api/users/{id}, POST /api/agencies endpoints
- Apply agency-based data filtering on campaigns, analytics, audit routes
- Block oversight_admin from all mutation routes (campaigns, proofs, flags, resolves)
- Restrict dropdown option mutations to super_admin only
- Add role check in WebSocket handler to block oversight_admin from analysis
- Add CurrentUserResponse, UserUpdate, AgencyCreate schemas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 08:28:23 -06:00
..
__init__.py Add Knowledge Base management system for AI agent specs 2026-02-12 15:00:36 -06:00
knowledge_base_routes.py Fix processing job not visible to background task (FK violation) 2026-02-12 16:09:50 -06:00
knowledge_base_schemas.py Add Knowledge Base management system for AI agent specs 2026-02-12 15:00:36 -06:00
routes.py Add 4-tier RBAC backend: auth dependencies, role enforcement, agency filtering 2026-02-19 08:28:23 -06:00
schemas.py Add 4-tier RBAC backend: auth dependencies, role enforcement, agency filtering 2026-02-19 08:28:23 -06:00