Refactor: Auth & Identity System v1.4

- Fix: Resolved SQLAlchemy Mapper error for 'UserVehicle' using string-based relationships.
- Fix: Fixed Postgres Enum case sensitivity issue for 'userrole' (forcing lowercase 'user').
- Fix: Resolved ImportError for 'create_access_token' in security module.
- Feature: Implemented 2-step registration protocol (Lite Register -> KYC Step).
- Data: Added bank-level KYC fields (mother's name, ID/Driver/Boat/Pilot license expiry and categories).
- Business: Applied private fleet isolation (is_transferable=False for individual orgs).
- Docs: Updated Grand Master Book to v1.4 and added Developer Pitfalls guide.
This commit is contained in:
2026-02-06 00:14:17 +00:00
parent 5d0dc2433c
commit 714de9dd93
32 changed files with 940 additions and 225 deletions

View File

@@ -1,3 +1,27 @@
# 🧪 TESZTELÉSI ÉS ÉLESÍTÉSI ÚTMUTATÓ (v1.4)
## 1. Előkészületek és Környezet
1. **SQL Patch:** Meglévő adatbázis esetén futtasd a manuális frissítő SQL-t (mothers_name, social_provider, is_transferable oszlopok hozzáadása).
2. **Enum Ellenőrzés:** Győződj meg róla, hogy a Postgres `userrole` típus tartalmazza a kisbetűs értékeket.
3. **Docker Build:** `docker compose up -d --build` (Kényszeríti az új Python kód betöltését).
## 2. Regisztrációs Teszt Forgatókönyvek
### A) Step 1: Lite Regisztráció (Clean Test)
- **Endpoint:** `POST /api/v1/auth/register`
- **Elvárt eredmény:** 201 Created, `access_token` visszaadva, de a DB-ben a User `is_active = False` és nincs hozzá Person rekord.
### B) Step 2: KYC Kitöltés (Advanced Test)
- **Endpoint:** `POST /api/v1/auth/complete-kyc`
- **Adat (JSON):**
```json
{
"mothers_name": "Minta Mária",
"id_card_number": "AB123456",
"driver_license_categories": ["A", "B"],
"boat_license_number": "H-99999"
}
# 🧪 TESZTELÉSI ÉS ÉLESÍTÉSI ÚTMUTATÓ (v1.0)
## 1. Előkészületek a távoli teszteléshez