arbret/backend
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
..
routes refactor: derive Permission type from generated OpenAPI schema 2025-12-21 23:55:47 +01:00
tests refactor(auth): unify authorization patterns with MANAGE_OWN_PROFILE permission 2025-12-21 23:50:06 +01:00
auth.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
database.py Extract duplicated DATABASE_URL parsing to database.py 2025-12-21 23:16:29 +01:00
env.example reviewed 2025-12-20 22:38:39 +01:00
invite_utils.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
jobs.py fix: guard pool initialization with asyncio.Lock to prevent race condition 2025-12-21 23:23:21 +01:00
main.py Use connection pool for job enqueueing instead of per-request 2025-12-21 23:13:22 +01:00
models.py refactor(auth): unify authorization patterns with MANAGE_OWN_PROFILE permission 2025-12-21 23:50:06 +01:00
pyproject.toml Phase 1: Add pgqueuer infrastructure 2025-12-21 22:37:04 +01:00
pytest.ini tests passing 2025-12-18 22:08:31 +01:00
schemas.py refactor: derive Permission type from generated OpenAPI schema 2025-12-21 23:55:47 +01:00
seed.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
shared_constants.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
validate_constants.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
validation.py Add ruff linter/formatter for Python 2025-12-21 21:54:26 +01:00
words.txt first implementation 2025-12-20 11:12:11 +01:00
worker.py fix: handle malformed JSON payloads in worker with error logging 2025-12-21 23:24:28 +01:00