Merge branch 'main' of https://gitlab.com/marvin.epip/enchere into marvin

This commit is contained in:
mepiphana2023
2024-04-23 11:31:46 +02:00

View File

@@ -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))