feat: update application version to 0.8.35 and enhance profile access controls
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 34s
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 34s
- Bumped application version to 0.8.35 in both backend and frontend files. - Updated profile retrieval and deletion endpoints to restrict access to the profile owner or platform admins, returning a 403 status for unauthorized access. - Added integration tests to verify access control for profile retrieval. - Enhanced changelog to reflect the new version and changes made in this release.
This commit is contained in:
1 parent
f03330bf77
commit
caab9f2863
5 files changed
+188
-6
No files matched your search
@@ -295,3 +295,29 @@ def test_member_club_b_can_read_own_club_exercise(
|
||||
body = r.json()
|
||||
assert body["id"] == cross_tenant.exercise_club_b_id
|
||||
assert body["visibility"] == "club"
|
||||
|
||||
|
||||
def test_get_profile_forbidden_other_user_integration(
|
||||
integration_app, cross_tenant: CrossTenantFixture
|
||||
):
|
||||
"""GET /profiles/{id}: Fremdes Profil → 403 (PostgreSQL-Integration)."""
|
||||
client = TestClient(integration_app)
|
||||
r = client.get(
|
||||
f"/api/profiles/{cross_tenant.user_b_id}",
|
||||
headers={"X-Auth-Token": cross_tenant.token_a},
|
||||
)
|
||||
assert r.status_code == 403
|
||||
|
||||
|
||||
def test_get_profile_ok_own_integration(
|
||||
integration_app, cross_tenant: CrossTenantFixture
|
||||
):
|
||||
client = TestClient(integration_app)
|
||||
r = client.get(
|
||||
f"/api/profiles/{cross_tenant.user_a_id}",
|
||||
headers={"X-Auth-Token": cross_tenant.token_a},
|
||||
)
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert body["id"] == cross_tenant.user_a_id
|
||||
assert "pin_hash" not in body
|
||||
Reference in new issue
Block a user