-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 관리자 모든 API 접근 가능하게 수정 #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis PR adds role-hierarchy support to Spring Security and adjusts service-level authorization checks: role checks that previously denied non-PERFORMER members now explicitly deny AUDIENCE members. It also threads authenticated member ID through the performer controller to the service for owner checks. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller as PerformerController
participant Auth as AuthenticationPrincipal
participant Service as PerformerService
participant Repo as AmateurShowRepository
participant DB as Database
Client->>Controller: GET /performer/shows/{amateurShowId}/reservations?roundId=...
Controller->>Auth: resolve authenticated principal (member)
Auth-->>Controller: Member (id)
Controller->>Service: getShowReservationList(memberId, amateurShowId, roundId)
Service->>Repo: findById(amateurShowId)
Repo->>DB: query show by id
DB-->>Repo: show record
Repo-->>Service: AmateurShow (with owner member)
Service->>Service: check show.member.id == memberId -> if not throw MEMBER_NOT_AUTHORIZED
Service->>Repo: load rounds/tickets/reservations...
Service-->>Controller: ShowReservationResponseDTO
Controller-->>Client: 200 OK (payload) / or error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.