[project] 프로젝트 참여자도 조회·수정·삭제 권한을 갖도록 수정#92
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the project repository query logic to allow access to both the owner and participants of a project. The review feedback suggests adding defensive checks for null userId values in the newly introduced ownerOrParticipant helper method to prevent potential NullPointerException or unintended SQL query behavior.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
e4a7a71 to
ab9fd58
Compare
wwwcomcomcomcom
left a comment
There was a problem hiding this comment.
ownerOrParticipant() 헬퍼로 권한 조건을 한 곳에 모은 것이 좋습니다. 참여자 접근 범위 확장이 PR 의도와 일치합니다. LGTM
ab9fd58 to
a32057d
Compare
98869f3 to
8d28b4e
Compare
The base branch was changed.
소유자 외 participants도 내 프로젝트 조회 및 단건 조회·수정·삭제가 가능하도록 권한 조건 확장
a32057d to
8f2357a
Compare
개요
프로젝트 참여자(participants)임에도 "내 프로젝트" 목록에 자신이 참여한 프로젝트가 보이지 않고, 수정·삭제도 불가능했습니다. 조회 및 권한 체크가 소유자(
user_id) 기준으로만 동작했기 때문으로, 참여자도 동일한 권한을 갖도록 조건을 확장합니다.작업 내용
ProjectRepositoryImpl에ownerOrParticipant(userId)조건 헬퍼 추가 —소유자 OR 참여자findByUserIdAndStatus(내 프로젝트·대기·반려 목록 조회)와findProjectWithCollectionsByIdAndUserId(단건 조회·수정·삭제 권한 체크)에 해당 조건 적용participants.any()기반 EXISTS 서브쿼리로 처리하여 컬렉션 fetch join과의 카테시안 곱을 회피체크리스트
기타
user_id조건으로 그대로 접근 가능하므로 별도 데이터 마이그레이션이 필요 없습니다.