2.3: PATCH /admin/persons/{person_id} — Person szerkesztése #311
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mérföldkő: Admin User & Person Management
Cél: Person adatok admin általi módosítása. Szerkeszthető mezők: last_name, first_name, phone, mothers_last_name, mothers_first_name, birth_place, birth_date, identity_docs, ice_contact, is_active, is_ghost. Address almzők is szerkeszthetők.
🔗 Függőségek (Dependencies)
📝 Elemzés
PATCH /admin/persons/{person_id}. Audit log bejegyzés. Address rekord frissítése ha változott.
✅ Munka befejezve: 2026-06-29 12:23:37
Technikai Összefoglaló:
Implemented PATCH /admin/persons/{person_id} endpoint with full field support (personal data, address, status). Added PersonUpdateRequest and PersonAddressUpdate Pydantic schemas with validators. Created persons:edit permission (id=42) and assigned to admin role. Tested: phone update → 200, multi-field + address → 200, missing person → 404, merged person → 409. Sync engine: ✅ 1279 OK.
⏱️ Az idő rögzítve.
✅ Gitea #311 — PATCH /admin/persons/{person_id} — KÉSZ
A Gitea #311-es kártya ("2.3: PATCH /admin/persons/{person_id} — Person szerkesztése") teljes mértékben implementálva, tesztelve, dokumentálva és lezárva.
📋 Implementáció összefoglaló
Módosított fájl:
backend/app/api/v1/endpoints/admin_persons.pyVégpont:
PATCH /admin/persons/{person_id}→200(sikeres) /404(nem létező) /409(merge-elt person)Szerkeszthető mezők:
last_name,first_name,phone,mothers_last_name,mothers_first_name,birth_place,birth_dateidentity_docs,ice_contactis_active,is_ghostaddress(nestedPersonAddressUpdate— zip, city, street, hrsz, GPS koordináták stb.)Validáció:
phone— csak számjegyek,+,-, szóköz (field_validator)last_name,first_name— nem lehet üres stringBiztonság:
RequirePermission("persons:edit")— új permission (id=42) létrehozva és admin role-hoz rendelvemerged_into_id is not None→ 409 Conflictjoinedloadminden kapcsolódó entitásraTesztelés:
Dokumentáció:
history.md— részletes technikai leírás