fix(P-13): repair 3 failing CI pytest tests for content_reports
Deploy Development / deploy (push) Successful in 37s
Test Suite / pytest-backend (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / playwright-tests (push) Successful in 59s
Deploy Development / deploy (push) Successful in 37s
Test Suite / pytest-backend (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / playwright-tests (push) Successful in 59s
- Add early 403 in set_legal_hold_from_report for plain admin (before DB call), fixing test_legal_hold_from_report_requires_superadmin - Update test_list_inbox_requires_platform_admin to mock DB COUNT query (returns cnt=0) so it exercises the club_admin code path correctly - Extend test_patch_report_under_review mock row with target_type, target_id, resolution_note fields now required by the audit-log path version: 0.8.94 module: content_reports 1.5.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
5cf61289ec
commit
56fc6d853d
4 files changed
+39
-7
No files matched your search
@@ -867,6 +867,13 @@ def set_legal_hold_from_report(
|
||||
pid = tenant.profile_id
|
||||
role = tenant.global_role
|
||||
|
||||
# Plattform-Admin ohne Superadmin hat keine Legal-Hold-Rechte (fruehzeitig ablehnen)
|
||||
if is_platform_admin(role) and not is_superadmin(role):
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
detail="Legal Hold erfordert Superadmin oder Vereinsadmin-Rechte",
|
||||
)
|
||||
|
||||
with get_db() as conn:
|
||||
cur = get_cursor(conn)
|
||||
cur.execute(
|
||||
|
||||
Reference in new issue
Block a user