Skip to content

Commit

Permalink
fix: bus/apply/**에 admin 권한 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
suw0n committed Jul 16, 2024
1 parent efd7512 commit d35f0a7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.access.intercept.AuthorizationFilter;
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
Expand Down Expand Up @@ -69,7 +67,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers("/wakeup-song/**").permitAll()

.requestMatchers(GET, "/bus").permitAll()
.requestMatchers("/bus/apply/**").hasRole(STUDENT)
.requestMatchers("/bus/apply/**").hasAnyRole(STUDENT, ADMIN)
.requestMatchers("/bus/**").hasRole(TEACHER)

.requestMatchers(POST, "/night-study").hasRole(STUDENT)
Expand Down

0 comments on commit d35f0a7

Please sign in to comment.