permission login

This commit is contained in:
jleroy2023
2025-07-16 11:40:58 +02:00
parent 1535f6bf19
commit 1cdc2c140e

View File

@@ -31,7 +31,7 @@ public class SecurityConfig {
http
.authorizeHttpRequests(auth -> auth
.requestMatchers("/api/auth").permitAll()
.requestMatchers("/user/**").hasAnyRole("ADMIN")
.requestMatchers("/api/**").hasAnyRole("USER")
.anyRequest().denyAll()
)
.formLogin(Customizer.withDefaults());