changes: api/usuarios/registrar para que admita solo un rol y los roles esten en la base de datos

This commit is contained in:
2026-02-14 12:13:59 -04:00
parent e5b699945c
commit a6a3b5a971
6 changed files with 80 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ public class SecurityConfig {
.requestMatchers("/ws/**").permitAll() // WebSocket
.requestMatchers("/auth/**").permitAll()
.requestMatchers("/favicon.ico", "/error", "/static/**", "/contador/**", "/api/**").permitAll()
.requestMatchers("/admin/**").hasRole("ADMIN")
.anyRequest().authenticated()
)
.httpBasic(Customizer.withDefaults());