Skip to content

Commit

Permalink
fix: api 접근 권한 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
kikingki committed Sep 21, 2024
1 parent 63ac654 commit 206776f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/dissonance/itit/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
)
.authorizeHttpRequests(authorizeRequests ->
authorizeRequests
.requestMatchers("/oauth/**", // TODO: 토큰 관련 작업 후 security 적용
"/swagger-ui/**",
"/v3/api-docs/**").permitAll()
.requestMatchers("/oauth/**", "/swagger-ui/**", "/v3/api-docs/**").permitAll()
.requestMatchers(HttpMethod.POST, "/info-posts").hasRole("ADMIN")
.requestMatchers(HttpMethod.PATCH, "/info-posts/{infoPostId}/reports").authenticated()
.requestMatchers("/info-posts/**", "/featured-posts/**").permitAll()
.anyRequest().authenticated()
)
.addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class)
Expand Down

0 comments on commit 206776f

Please sign in to comment.