feat: add tests for authorization guards and role-based access control

This commit is contained in:
2025-11-09 23:27:10 +01:00
parent 0f79864188
commit 118657491c
3 changed files with 477 additions and 0 deletions

View File

@@ -25,3 +25,5 @@
## 2025-11-10
- Extended authorization helper layer with project/scenario ownership lookups, integrated them into FastAPI dependencies, refreshed pytest fixtures to keep the suite authenticated, and documented the new patterns across RBAC plan and security guides.
- Added dedicated pytest coverage for guard dependencies, exercising success plus failure paths (missing session, inactive user, missing roles, project/scenario access errors) via `tests/test_dependencies_guards.py`.
- Added integration tests in `tests/test_authorization_integration.py` verifying anonymous 401 responses, role-based 403s, and authorized project manager flows across API and UI endpoints.