securityConfig

This commit is contained in:
Parpaillax
2024-04-23 15:23:39 +02:00
parent 74ac33bf5f
commit c1d0ccf39e

View File

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