feat(version): update app version to 0.8.83 and fix club_admin check in journal/correction endpoints
Deploy Development / deploy (push) Successful in 37s
Test Suite / pytest-backend (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 10s
Test Suite / playwright-tests (push) Successful in 56s

This commit is contained in:
Lars committed 2026-05-11 11:47:45 +02:00
1 parent 0edc86e05a
commit 61baf26da6
3 files changed
+13 -15

No files matched your search

+3 -12
View File
@@ -13,6 +13,7 @@ from club_tenancy import (
assert_club_member,
assert_valid_governance_visibility,
club_ids_for_profile_with_roles,
has_club_role,
is_platform_admin,
is_superadmin,
library_content_visible_to_profile,
@@ -1797,12 +1798,7 @@ def get_media_asset_journal(
is_uploader = asset.get("uploaded_by_profile_id") == profile_id
is_club_adm = False
if asset.get("club_id"):
cur.execute(
"""SELECT 1 FROM club_members
WHERE profile_id = %s AND club_id = %s AND role = 'admin' AND status = 'active'""",
(profile_id, asset["club_id"]),
)
is_club_adm = cur.fetchone() is not None
is_club_adm = has_club_role(cur, profile_id, asset["club_id"], "club_admin")
if not (is_sup or is_uploader or is_club_adm):
raise HTTPException(status_code=403, detail="Keine Berechtigung (Superadmin, Uploader oder Vereinsadmin)")
@@ -1895,12 +1891,7 @@ def add_rights_correction(
is_uploader = asset.get("uploaded_by_profile_id") == profile_id
is_club_adm = False
if asset.get("club_id"):
cur.execute(
"""SELECT 1 FROM club_members
WHERE profile_id = %s AND club_id = %s AND role = 'admin' AND status = 'active'""",
(profile_id, asset["club_id"]),
)
is_club_adm = cur.fetchone() is not None
is_club_adm = has_club_role(cur, profile_id, asset["club_id"], "club_admin")
if not (is_sup or is_uploader or is_club_adm):
raise HTTPException(