video-accessibility/backend/app/core
Vadym Samoilenko 2b721d182b feat: Client → Team → Project isolation system with Project Manager role
Backend:
- New UserRole.PROJECT_MANAGER with pm_client_ids[] on User model
- New models: Client (slug-based), Team (member_user_ids[]), Project (client-scoped)
- Job model gains project_id field
- New GET/POST/PATCH/DELETE /clients, /clients/{id}/teams, /clients/{id}/projects,
  /clients/{id}/pm routes (admin-only client CRUD; PM or admin for teams/projects)
- get_accessible_project_ids() helper: staff→all, PM→their clients' projects,
  CLIENT→projects from teams they belong to (with legacy owner fallback)
- list_jobs, get_job, bulk_download, get_vtt_content, delete_job all use new isolation

Frontend:
- UserRole type gains 'project_manager'
- Job, JobCreateRequest gain project_id field
- Client, Team, Project, PMUser types added
- ApiClient: full client/team/project/PM CRUD methods
- useClients hook with all query/mutation hooks
- Admin pages: ClientList + ClientDetail (teams, members, projects, PM assignment)
- NewJob form: client + project picker (shown when clients exist)
- Sidebar: Clients nav item for admin and project_manager roles
- Routes: /admin/clients and /admin/clients/:clientId behind RoleGate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 15:11:13 +01:00
..
__pycache__ fixed objectID/stringID mismatch 2025-10-08 18:23:05 -05:00
config.py feat: replace SDK with direct HTTP integration to centralized cost tracker 2026-04-27 13:36:15 +01:00
database.py feat: add video review with timestamped notes to Final Review 2025-12-26 15:30:00 -06:00
dependencies.py feat: Client → Team → Project isolation system with Project Manager role 2026-04-27 15:11:13 +01:00
logging.py initial commit 2025-08-24 16:28:33 -05:00
redis.py initial commit 2025-08-24 16:28:33 -05:00
secrets_config.py initial commit 2025-08-24 16:28:33 -05:00
security.py initial commit 2025-08-24 16:28:33 -05:00
seed.py feat: add linguist role and user management navigation 2026-04-16 11:46:33 +01:00