refactor: 모든 사용자가 동아리 회비 정보에 접근할 수 있도록 변경#224
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
이 PR은 동아리 회비 정보 조회 API의 접근 제어를 제거하여 모든 사용자가 회비 계좌 정보에 접근할 수 있도록 변경합니다. 기존에는 동아리에 가입 신청을 완료한 사용자 또는 동아리 관리자만 접근할 수 있었으나, 이제는 인증이 필요 없는 공개 API로 전환됩니다.
Changes:
- 동아리 회비 정보 조회 엔드포인트에
@PublicApi어노테이션 추가하여 인증 우회 getFeeInfo메서드에서 userId 매개변수 및 관련 권한 검증 로직 제거- API 문서에서 권한 관련 에러 코드 제거 및 설명 간소화
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ClubApplicationService.java | getFeeInfo 메서드에서 userId 매개변수와 사용자/관리자 권한 검증 로직 제거, MANAGERS 상수 import 제거 |
| ClubApplicationController.java | getFeeInfo 메서드에서 @userid 어노테이션 및 userId 매개변수 제거 |
| ClubApplicationApi.java | @publicapi 어노테이션 추가, API 문서에서 권한 관련 설명 및 에러 코드 제거 |
| } | ||
|
|
||
| public ClubFeeInfoResponse getFeeInfo(Integer clubId, Integer userId) { | ||
| public ClubFeeInfoResponse getFeeInfo(Integer clubId) { |
There was a problem hiding this comment.
이 메서드는 이제 모든 사용자가 동아리 회비 계좌 정보(은행명, 계좌번호, 예금주)에 접근할 수 있도록 허용합니다. 이러한 정보가 공개되어도 보안상 문제가 없는지, 그리고 이것이 의도된 비즈니스 요구사항인지 확인이 필요합니다. 계좌 정보는 민감한 정보일 수 있으며, 동아리에 가입하지 않은 사용자에게도 노출됩니다.
Suggested change
| public ClubFeeInfoResponse getFeeInfo(Integer clubId) { | |
| public ClubFeeInfoResponse getFeeInfo(Integer clubId, Integer userId) { | |
| userRepository.getById(userId); | |
| clubPermissionValidator.validateManagerAccess(clubId, userId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 개요
🚀 주요 변경 내용
💬 참고 사항
✅ Checklist (완료 조건)