permission login
This commit is contained in:
@@ -31,7 +31,7 @@ public class SecurityConfig {
|
|||||||
http
|
http
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/api/auth").permitAll()
|
.requestMatchers("/api/auth").permitAll()
|
||||||
.requestMatchers("/user/**").hasAnyRole("ADMIN")
|
.requestMatchers("/api/**").hasAnyRole("USER")
|
||||||
.anyRequest().denyAll()
|
.anyRequest().denyAll()
|
||||||
)
|
)
|
||||||
.formLogin(Customizer.withDefaults());
|
.formLogin(Customizer.withDefaults());
|
||||||
|
|||||||
Reference in New Issue
Block a user