Ignore:
Timestamp:
11/20/22 16:34:52 (20 months ago)
Author:
Marko <Marko@…>
Branches:
master
Parents:
ffd50db
Message:

Final features implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • phonelux-backend/src/main/java/finki/it/phoneluxbackend/security/configs/WebSecurityConfig.java

    rffd50db r47f4eaf  
    55import finki.it.phoneluxbackend.services.UserService;
    66import lombok.AllArgsConstructor;
     7import org.springframework.beans.factory.annotation.Autowired;
    78import org.springframework.context.annotation.Bean;
    89import org.springframework.context.annotation.Configuration;
     
    1718import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
    1819
    19 import static org.springframework.http.HttpMethod.GET;
    20 
    2120@Configuration
    2221@AllArgsConstructor
     
    2625    private final UserService userService;
    2726    private final BCryptPasswordEncoder bCryptPasswordEncoder;
    28 
    2927    @Override
    3028    protected void configure(HttpSecurity http) throws Exception {
     
    4745                .antMatchers("/admin/**")
    4846                .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()
    4957                .anyRequest().permitAll();
    50 
    5158
    5259
     
    5562
    5663    }
     64
    5765
    5866    @Override
Note: See TracChangeset for help on using the changeset viewer.