UDT-008: Gestión completa de usuarios #11
Reference in New Issue
Block a user
Delete Branch "feature/UDT-008"
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?
Summary
Cierre definitivo del módulo Auth. CRUD completo de usuarios + passwords + guard anti-lockout.
Backend (.NET 10)
MustChangePassword BIT+ índiceIX_Usuario_Activo_RolDomainExceptionhierarchy +LastAdminLockoutException+UsuarioNotFoundException+CannotSelfResetExceptionTempPasswordGeneratorcon RNG seguro (12 chars, sin ambiguos)LoginResponseextiende conusernameymustChangePassword;UltimoLoginse actualiza best-effortUsuarioinmutable con factoriesWith…Frontend (React 19)
authStore.AuthUser+=username+mustChangePassword+ acciónupdateUserMustChangePasswordGate→ redirect forzoso a/perfil/contrasenasi flag activoUsersListPage(filtros rol/activo/search + paginación),UserDetailPage,UserEditPageChangeMyPasswordPage(con confirm match client-side),ResetPasswordModal(copy + warning única vez)Out of scope (diferido)
Usuario.PermisosJsonoverrides — catalogada en STATUSSDD Artifacts (engram)
sdd/udt-008-gestion-usuarios/*— explore / proposal / spec / design / tasks / apply-progress / verify-reportTest plan
dotnet test tests/SIGCM2.Application.Tests— 287/287dotnet test tests/SIGCM2.Api.Tests— 100/100cd src/web && npx vitest run— 117/117SIGCM2(dev) antes de probar manualmente — ODBC Driver 17 no está instalado en la workstation, aplicar desde SSMS/Azure Data StudioBatch 7: POST /api/v1/users/{id}/password/reset (admin only). - TempPasswordGenerator: RandomNumberGenerator.Fill, 12-char min, full charset diversity, never logs result - ResetUsuarioPasswordCommandHandler: self-reset guard, 404, hash, mustChangePassword=true, revoke all tokens - ExceptionFilter: CannotSelfResetException → 400 {error: cannot-self-reset} - Unit tests: TempPasswordGeneratorTests (8), ResetUsuarioPasswordCommandHandlerTests (5) - Integration tests: ResetPasswordEndpointTests (6) — 200/length/self-reset/404/401/403