Update permission accès

This commit is contained in:
jleroy
2024-04-23 11:20:42 +02:00
parent 9fbd893865
commit b983676adb

View File

@@ -17,7 +17,7 @@ public class WebSecurityConfig {
.requestMatchers("/accueil", "/login", "/inscription", "/searchArticle").permitAll()
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").permitAll()
.requestMatchers("/profile").hasAnyRole("MEMBRE", "ADMIN")
.requestMatchers("/admin").hasRole("MEMBRE")
.requestMatchers("/admin").hasRole("ADMIN")
.anyRequest().authenticated())
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))
.logout((logout) -> logout.clearAuthentication(true).invalidateHttpSession(true)