From b7ef6c4b6200b9ee22ad0f0679aecc0f0f0d907d Mon Sep 17 00:00:00 2001 From: rfetalvero Date: Thu, 28 Sep 2023 06:50:24 +0800 Subject: [PATCH] Additional config --- .../de/hhu/propra/link/security/SecurityConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hhu/propra/link/security/SecurityConfiguration.java b/src/main/java/de/hhu/propra/link/security/SecurityConfiguration.java index 6556d48..b418075 100644 --- a/src/main/java/de/hhu/propra/link/security/SecurityConfiguration.java +++ b/src/main/java/de/hhu/propra/link/security/SecurityConfiguration.java @@ -14,7 +14,8 @@ public class SecurityConfiguration { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests((auth) -> auth .requestMatchers("/*/delete").hasRole("ADMIN") - .requestMatchers("/admin").hasRole("ADMIN")); + .requestMatchers("/admin").hasRole("ADMIN") + .anyRequest().authenticated()); http.formLogin((form) -> form.loginPage("/login").permitAll()); http.logout(LogoutConfigurer::permitAll); return http.build();