fix(i-d): RBAC-Comprehensive 4 Failures behoben — http_exception_handler um dict-detail-Durchreichung erweitert (strukturierte Error-Codes AGENTS.md-konform, body[detail] = raw_detail dict statt stringify); 3 Contact-Payload-Feldnamen korrigiert (firstname/surname statt first_name/last_name in legacy-editor Tests); test_rbac_comprehensive 102/102 gruen

This commit is contained in:
Agent Zero
2026-08-25 12:57:52 +02:00
parent d901d001c7
commit f6dde68221
3 changed files with 26 additions and 9 deletions
+3 -3
View File
@@ -926,7 +926,7 @@ class TestRBACRouteGuard:
csrf = await login_with_csrf(client, "viewer@tenanta.com")
resp = await client.post(
"/api/v1/contacts",
json={"first_name": "Test", "last_name": "User", "type": "person"},
json={"firstname": "Test", "surname": "User", "type": "person"},
headers=csrf_headers(csrf),
)
assert resp.status_code == 403
@@ -1071,7 +1071,7 @@ class TestRBACRouteGuard:
csrf = await login_with_csrf(client, "editor@tenanta.com")
resp = await client.post(
"/api/v1/contacts",
json={"first_name": "Editor", "last_name": "Contact", "type": "person"},
json={"firstname": "Editor", "surname": "Contact", "type": "person"},
headers=csrf_headers(csrf),
)
assert resp.status_code == 201
@@ -1085,7 +1085,7 @@ class TestRBACRouteGuard:
csrf = await login_with_csrf(client, "viewer@tenanta.com")
resp = await client.post(
"/api/v1/contacts",
json={"first_name": "Viewer", "last_name": "Contact", "type": "person"},
json={"firstname": "Viewer", "surname": "Contact", "type": "person"},
headers=csrf_headers(csrf),
)
assert resp.status_code == 403