Skip to content

Commit

Permalink
Merge pull request #123 from Tiketeer/feat/DEV-329
Browse files Browse the repository at this point in the history
[DEV-329] Security 권한 수정
  • Loading branch information
dla0510 authored Jun 21, 2024
2 parents cae98e3 + 8325b95 commit bc617b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class RequestMatcherHolder {
new RequestInfo(GET, "/members/*", RoleEnum.BUYER),
new RequestInfo(GET, "/members", RoleEnum.BUYER),
new RequestInfo(GET, "/members/*/purchases", RoleEnum.BUYER),
new RequestInfo(GET, "/members/*/purchases/*", RoleEnum.BUYER),
new RequestInfo(GET, "/members/*/sale", RoleEnum.SELLER),
new RequestInfo(POST, "/members/*/points", RoleEnum.BUYER),

Expand All @@ -42,9 +43,13 @@ public class RequestMatcherHolder {
new RequestInfo(PATCH, "/ticketings/*", RoleEnum.SELLER),
new RequestInfo(DELETE, "/ticketings/*", RoleEnum.SELLER),

//ticket
new RequestInfo(POST, "/ticketings/*/tickets", RoleEnum.SELLER),
new RequestInfo(PUT, "/ticketings/*/tickets", RoleEnum.SELLER),

// purchase
new RequestInfo(POST, "/purchases", RoleEnum.BUYER),
new RequestInfo(DELETE, "/purchases/*/tickets", RoleEnum.BUYER),
new RequestInfo(DELETE, "/purchases/*/items", RoleEnum.BUYER),

// swagger
new RequestInfo(GET, "/v3/api-docs/**", null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import jakarta.validation.Valid;

@RestController
@RequestMapping("/ticketing/{ticketingId}/tickets")
@RequestMapping("/ticketings/{ticketingId}/tickets")
public class TicketController {
private final SecurityContextHelper securityContextHelper;
private final CreateTicketUseCase createTicketUseCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void postTicketSuccess() throws Exception {

// when
mockMvc
.perform(post("/api/ticketing/{ticketingId}/tickets", ticketing.getId())
.perform(post("/api/ticketings/{ticketingId}/tickets", ticketing.getId())
.contextPath("/api")
.contentType(MediaType.APPLICATION_JSON)
.characterEncoding("utf-8")
Expand Down Expand Up @@ -143,7 +143,7 @@ void putTicketSuccess() throws Exception {

// when
mockMvc
.perform(put("/api/ticketing/{ticketingId}/tickets", ticketing.getId())
.perform(put("/api/ticketings/{ticketingId}/tickets", ticketing.getId())
.contextPath("/api")
.contentType(MediaType.APPLICATION_JSON)
.characterEncoding("utf-8")
Expand Down

0 comments on commit bc617b4

Please sign in to comment.