arbret/backend/routes
counterweight 09560296aa
refactor: derive Permission type from generated OpenAPI schema
Issue #3: The frontend Permission enum was manually duplicated from
the backend. While full generation isn't practical, this change
ties the frontend constants to the generated OpenAPI types for
compile-time validation.

Changes:
- Update ConstantsResponse schema to use actual Permission/InviteStatus
  enums (enables OpenAPI to include enum values)
- Import enums in schemas.py (no circular dependency issue)
- Update auth-context.tsx to derive PermissionType from generated schema
- Update meta route to return enum instances instead of string values
- Permission values are now type-checked against the OpenAPI schema

If a permission is added to the backend but not to the frontend's
Permission object, TypeScript will fail to compile. This provides
a safety net without requiring a complex build-time generation step.
2025-12-21 23:55:47 +01:00
..
__init__.py first implementation 2025-12-20 22:18:14 +01:00
audit.py Use explicit join in random-jobs endpoint to avoid potential N+1 query 2025-12-21 23:14:08 +01:00
auth.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
availability.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
booking.py fix pre-commit hook and code quality fixes 2025-12-21 22:14:48 +01:00
counter.py Phase 2: Job enqueueing from counter 2025-12-21 22:44:31 +01:00
invites.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
meta.py refactor: derive Permission type from generated OpenAPI schema 2025-12-21 23:55:47 +01:00
profile.py refactor(auth): unify authorization patterns with MANAGE_OWN_PROFILE permission 2025-12-21 23:50:06 +01:00
sum.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00