1.2: PATCH /admin/users/{user_id} — Felhasználó szerkesztése admin által #306
Notifications
Total Time Spent: 14 minutes
kincses
14 minutes
No due date set.
Dependencies
No dependencies set.
Reference: kincses/service-finder#306
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: REST végpont admin általi felhasználó módosításhoz. Korlátozott mezők: email, is_active, is_vip, preferred_language, region_code, preferred_currency, subscription_plan, subscription_expires_at, max_vehicles, max_garages, scope_level, scope_id, role_id (csak superadmin), custom_permissions. Person almzők: last_name, first_name, phone, mothers data, birth data, identity_docs.
🔗 Függőségek (Dependencies)
📝 Elemzés
PATCH végpont a meglévő admin.py-ban. Ellenőrizni kell a rangot (superadmin vs admin). Audit log bejegyzés minden módosításról. Person adatok módosítása opcionális nested JSON-ben.
▶️ Munka megkezdve: 2026-06-29 03:48:47
✅ Munka befejezve: 2026-06-29 04:03:18
Technikai Összefoglaló:
PATCH /admin/users/{user_id} endpoint implementálva. Támogatott mezők: email, is_active, is_vip, preferred_language, region_code, preferred_currency, subscription_plan, subscription_expires_at, scope_level, scope_id, role_id, custom_permissions, person (last_name, first_name, phone, mothers_last_name, mothers_first_name, birth_place, birth_date, identity_docs). Biztonság: SUPERADMIN nem módosítható, role_id módosítás csak SUPERADMIN-nak, RequirePermission('user:edit'), email egyediség ellenőrzés, audit log. Tesztek: ✅ Minden eset sikeres.
⏱️ Az idő rögzítve.
✅ Gitea #306 — PATCH /admin/users/{user_id} — Kész
A Gitea #306 kártya sikeresen lezárva. Az alábbi implementációk készültek el:
📁 Módosított fájlok
backend/app/api/v1/endpoints/admin_users.pyPATCH /admin/users/{user_id}végpont +AdminUserUpdate+AdminPersonUpdatePydantic sémákbackend/tests/test_admin_user_patch.py.roo/history.md⚙️ Végpont:
PATCH /admin/users/{user_id}Támogatott mezők:
email,is_active,is_vip,preferred_language,region_code,preferred_currency,subscription_plan,subscription_expires_at,scope_level,scope_id,role_id,custom_permissionslast_name,first_name,phone,mothers_last_name,mothers_first_name,birth_place,birth_date,identity_docsBiztonság:
RequirePermission("user:edit")— DB-driven RBACrole_idmódosítás csak SUPERADMIN-nak (403)ADMIN_USER_UPDATEaction✅ Tesztek