Add create_user method to LocalAuthProvider (bcrypt hash + INSERT, raises ValueError on duplicate username/email). Add UserService with 9 async methods: create/list/get/update/delete (soft)/reset_password/assign_department/remove_department/list_user_departments. reset_password revokes all sessions via SessionService. delete_user is soft (is_active=0, row preserved). Add 9 user endpoints to routes/admin.py: POST/GET/PATCH/DELETE users, reset-password, assign/remove department, list departments. All guarded by _require_admin. Tests: 40 unit + 37 integration = 77 new tests. Full admin suite 170 tests pass, no regressions. |
||
|---|---|---|
| .. | ||
| e2e | ||
| integration | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||
| test_routing_chain.py | ||