Merge branch 'main' of https://gitlab.com/marvin.epip/enchere into marvin
This commit is contained in:
@@ -16,6 +16,7 @@ public class WebSecurityConfig {
|
||||
http.authorizeHttpRequests((requests) -> requests.requestMatchers("/", "/accueil").permitAll()
|
||||
.requestMatchers("/accueil", "/login", "/inscription", "/searchArticle").permitAll()
|
||||
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").permitAll()
|
||||
.requestMatchers("/profile").hasAnyRole("MEMBRE", "ADMIN")
|
||||
.requestMatchers("/admin").hasRole("ADMIN")
|
||||
.anyRequest().authenticated())
|
||||
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))
|
||||
|
||||
Reference in New Issue
Block a user