|
|
2925336783
|
feat(api): List + GetById usuarios — handlers, repo, endpoints [UDT-008]
|
2026-04-15 17:46:23 -03:00 |
|
|
|
0218d8d371
|
feat(api): migrar controllers admin a RequirePermission [UDT-006]
|
2026-04-15 16:34:32 -03:00 |
|
|
|
1a864e9f8b
|
fix(app): validar formato codigo rol en GetRolPermisos [UDT-005]
Agrega GetRolPermisosQueryValidator con regex ^[a-z][a-z0-9_]*$ para
rechazar codigos invalidos con 400 en GET /api/v1/roles/{codigo}/permisos.
|
2026-04-15 15:56:49 -03:00 |
|
|
|
4913a35d06
|
feat(api): BATCH 5 - PermisosController + tests HTTP [UDT-005]
|
2026-04-15 15:42:03 -03:00 |
|
|
|
6f999b8fcd
|
feat(api): UDT-004 controller de roles + refactor validator UDT-003 a lookup dinamico
- RolesController /api/v1/roles CRUD admin-only: GET list, GET {codigo}, POST, PUT, DELETE (soft-delete con guard 409)
- ExceptionFilter: mapea RolNotFound (404), RolAlreadyExists (409), RolInUse (409)
- DI: registra 5 handlers de Roles (Application) y IRolRepository/RolRepository (Infrastructure)
- CreateUsuarioCommandValidator: reemplaza whitelist hardcoded por IRolRepository.ExistsActiveByCodigoAsync via MustAsync; constructor recibe (AuthOptions, IRolRepository)
- Tests: 202 verdes (173 application + 29 api). Nuevas: RolesEndpointTests (13 integration), CreateUsuarioCommandValidatorTests reescrito con NSubstitute mock, CreateUsuario_WithInactiveRol_Returns400 en Api.Tests
- Fix: ApiIntegration pasa de IClassFixture (N factories) a ICollectionFixture (1 factory shared) — evitaba ObjectDisposedException sobre RSABCrypt al compartir coleccion con multiples test classes
- tests/tests.runsettings: MaxCpuCount=1 para evitar race entre assemblies sobre SIGCM2_Test
|
2026-04-15 12:50:24 -03:00 |
|
|
|
3d598faffc
|
feat(api): UDT-003 registro de usuarios — backend completo (Phases 1-6)
- Domain: Usuario.ForCreation factory, UsernameAlreadyExistsException, IUsuarioRepository extendido
- Application: CreateUsuarioCommand/Validator/Handler, UsuarioCreatedDto, AuthOptions password policy
- Infrastructure: UsuarioRepository.ExistsByUsernameAsync + AddAsync (INSERT OUTPUT INSERTED.Id), RoleClaimType="rol" en TokenValidationParameters
- Api: UsuariosController POST api/v1/users [Authorize(Roles="admin")], ExceptionFilter mapea UsernameAlreadyExistsException + SqlException 2627 → 409
- Tests (unit): 43 tests — 33 validator + 10 handler (107 total, green)
- Tests (integration): 7 tests CreateUsuarioEndpoint — 401/403/400/201/409/race/e2e (green)
- Fix: TestWebAppFactory.ConfigureTestServices reemplaza SqlConnectionFactory singleton con CS de test correcto
|
2026-04-15 10:47:48 -03:00 |
|
|
|
8768067fdd
|
feat(api): add /refresh [AllowAnonymous] and /logout [Authorize] endpoints to AuthController
|
2026-04-14 13:28:45 -03:00 |
|
|
|
9891f96618
|
feat(udt-001): api layer with AuthController, Program.cs and Serilog
|
2026-04-13 21:36:08 -03:00 |
|