Commit 5e546564 by Patryk Czarnik

.anyRequest().authenticated()

parent cf48da25
...@@ -13,17 +13,7 @@ public class SecurityConfig { ...@@ -13,17 +13,7 @@ public class SecurityConfig {
SecurityFilterChain setHttpSecurity(HttpSecurity httpSecurity) throws Exception { SecurityFilterChain setHttpSecurity(HttpSecurity httpSecurity) throws Exception {
httpSecurity httpSecurity
.authorizeHttpRequests((authz) -> authz .authorizeHttpRequests((authz) -> authz
.anyRequest().permitAll() .anyRequest().authenticated()
// .requestMatchers("/").permitAll()
// .requestMatchers("/whoami").permitAll()
// .requestMatchers("/*.css").permitAll()
// .requestMatchers("/hello", "/time").permitAll()
// .requestMatchers("/alt?/**").authenticated() // zalogowany jako ktokolwiek
// .requestMatchers("/products/new", "/products/*/edit").hasAuthority("ROLE_manager")
// .requestMatchers("/products/**").permitAll()
// .requestMatchers("/customers/new", "/customers/*/edit").hasAuthority("ROLE_manager")
// .requestMatchers("/customers/**").authenticated()
// .anyRequest().denyAll()
) )
.formLogin(); .formLogin();
return httpSecurity.build(); return httpSecurity.build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment