Refactor Admin Rights Management and Update Versioning
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Failing after 1s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Has been cancelled
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Failing after 1s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Has been cancelled
- Replaced the admin club feature exemptions router with a new admin rights router to streamline capability management. - Added new API endpoints for managing admin rights, including capability grants and quota bypass for portal roles and profiles. - Updated the frontend to include navigation and lazy loading for the new Admin Rights page. - Incremented application version to 0.8.197 to reflect these changes and enhancements.
This commit is contained in:
1 parent
8404a42b6c
commit
e4cb491d46
9 files changed
+1422
-231
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""M6: Admin-Rollen/Rechte-API — Zugriffskontrolle."""
|
||||
import pytest
|
||||
from fastapi import HTTPException
|
||||
|
||||
from routers.admin_rights import get_capability_matrix, _require_superadmin
|
||||
|
||||
|
||||
def test_require_superadmin_denies_admin():
|
||||
with pytest.raises(HTTPException) as exc:
|
||||
_require_superadmin({"role": "admin"})
|
||||
assert exc.value.status_code == 403
|
||||
|
||||
|
||||
def test_require_superadmin_allows():
|
||||
_require_superadmin({"role": "superadmin"})
|
||||
|
||||
|
||||
def test_get_capability_matrix_requires_superadmin():
|
||||
with pytest.raises(HTTPException) as exc:
|
||||
get_capability_matrix(session={"role": "trainer"})
|
||||
assert exc.value.status_code == 403
|
||||
Reference in new issue
Block a user