Skip to content

Commit

Permalink
test: securityConfig 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
I-migi committed Nov 28, 2024
1 parent eeeea50 commit 63ffe03
Showing 1 changed file with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public SecurityFilterChain jwtOnlyFilterChain(HttpSecurity http) throws Exceptio
.requestMatchers(HttpMethod.POST, "/v1/clubs/{clubToken}/clubMembers/").authenticated()
.requestMatchers("/v1/clubs/{clubToken}/leagues/month").permitAll()
.requestMatchers("/v1/clubs/{clubToken}/leagues/date").permitAll()
.requestMatchers("/v1/clubs/**").permitAll()
.anyRequest().authenticated());
return http.build();
}
Expand All @@ -121,45 +122,45 @@ public SecurityFilterChain clubFilterChain(HttpSecurity http) throws Exception {
.exceptionHandling(
exception -> exception.authenticationEntryPoint(failedAuthenticationEntryPoint))
.authorizeHttpRequests(auth -> auth
.requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/month")
.permitAll()
.requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/date")
.permitAll()
.requestMatchers(HttpMethod.GET, "/v1/clubs", "/v1/clubs/{clubToken}", "/v1/clubs/search", "/v2/**")
.permitAll()
.requestMatchers(HttpMethod.POST, "/v1/clubs")
.permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/month")
// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/date")
// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs", "/v1/clubs/{clubToken}", "/v1/clubs/search", "/v2/**")
// .permitAll()
// .requestMatchers(HttpMethod.POST, "/v1/clubs")
// .permitAll()
// .requestMatchers(HttpMethod.DELETE, "/v1/clubs/{clubToken}")
// .access(hasClubRole("OWNER"))
// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/applicants")
// .access(hasClubRole("OWNER", "MANAGER"))
// .permitAll()
// .requestMatchers(HttpMethod.PATCH, "/v1/clubs/{clubToken}")
// .access(hasClubRole("OWNER", "MANAGER"))
.requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/{leagueId}")
.permitAll()
// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/leagues/{leagueId}")
// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}/clubMembers")
// .access(hasClubRole("OWNER", "MANAGER", "USER"))
.requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}")
.permitAll()

// .permitAll()
// .requestMatchers(HttpMethod.GET, "/v1/clubs/{clubToken}")
// .permitAll()
// .requestMatchers(HttpMethod.POST, "/v1/clubs/{clubToken}/clubMembers/approve",
// "/v1/clubs/{clubToken}/clubMembers/reject")
// .access(hasClubRole("OWNER", "MANAGER"))
// .permitAll()
// .requestMatchers(HttpMethod.POST, "/v1/clubs/images")
// .access(hasClubRole("OWNER", "MANAGER"))
// .permitAll()
// .requestMatchers(HttpMethod.DELETE, "/v1/clubs/{clubToken}/leagues/{leagueId}")
// .access(hasClubRole("OWNER", "MANAGER", "USER"))
// .permitAll()
// .requestMatchers(HttpMethod.PATCH, "/v1/clubs/{clubToken}/leagues/{leagueId}")
// .access(hasClubRole("OWNER", "MANAGER", "USER"))
// .permitAll()
// .requestMatchers(HttpMethod.POST, "/v1/clubs/{clubToken}/leagues/{leagueId}/participation",
// "/v1/clubs/{clubToken}/leagues")
// .access(hasClubRole("OWNER", "MANAGER", "USER"))
// .permitAll()
// .requestMatchers(HttpMethod.DELETE, "/v1/clubs/{clubToken}/leagues/{leagueId}/participation")
// .access(hasClubRole("OWNER", "MANAGER", "USER"))
// .permitAll()
// .requestMatchers(HttpMethod.PATCH,
// "/v1/clubs/{clubToken}/clubMembers/role",
// "/v1/clubs/{clubToken}/clubMembers/role",
// "v1/clubs/{clubToken}/clubMembers/ban", "v1/clubs/{clubToken}/clubMembers/expel")
// .access(hasClubRole("OWNER"))
// .permitAll()

.anyRequest()
.authenticated()
);
Expand Down

0 comments on commit 63ffe03

Please sign in to comment.