Changeset 47f4eaf for phonelux-backend/src/main/java/finki/it/phoneluxbackend/security/configs/WebSecurityConfig.java
Legend:
- Unmodified
- Added
- Removed
-
phonelux-backend/src/main/java/finki/it/phoneluxbackend/security/configs/WebSecurityConfig.java
rffd50db r47f4eaf 5 5 import finki.it.phoneluxbackend.services.UserService; 6 6 import lombok.AllArgsConstructor; 7 import org.springframework.beans.factory.annotation.Autowired; 7 8 import org.springframework.context.annotation.Bean; 8 9 import org.springframework.context.annotation.Configuration; … … 17 18 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; 18 19 19 import static org.springframework.http.HttpMethod.GET;20 21 20 @Configuration 22 21 @AllArgsConstructor … … 26 25 private final UserService userService; 27 26 private final BCryptPasswordEncoder bCryptPasswordEncoder; 28 29 27 @Override 30 28 protected void configure(HttpSecurity http) throws Exception { … … 47 45 .antMatchers("/admin/**") 48 46 .hasAnyAuthority("ADMIN","SUPERADMIN") 47 .and() 48 .authorizeRequests() 49 .antMatchers("/offerreport/**") 50 .hasAnyAuthority("USER", "ADMIN", "SUPERADMIN") 51 .and() 52 .authorizeRequests() 53 .antMatchers("/scrapperinfo/**") 54 .hasAnyAuthority("SUPERADMIN") 55 .and() 56 .authorizeRequests() 49 57 .anyRequest().permitAll(); 50 51 58 52 59 … … 55 62 56 63 } 64 57 65 58 66 @Override
Note:
See TracChangeset
for help on using the changeset viewer.