Skip to content

[project] 프로젝트 참여자도 조회·수정·삭제 권한을 갖도록 수정#92

Merged
ZaMan0806 merged 1 commit into
developfrom
fix/project-participants-permission
Jun 9, 2026
Merged

[project] 프로젝트 참여자도 조회·수정·삭제 권한을 갖도록 수정#92
ZaMan0806 merged 1 commit into
developfrom
fix/project-participants-permission

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

개요

프로젝트 참여자(participants)임에도 "내 프로젝트" 목록에 자신이 참여한 프로젝트가 보이지 않고, 수정·삭제도 불가능했습니다. 조회 및 권한 체크가 소유자(user_id) 기준으로만 동작했기 때문으로, 참여자도 동일한 권한을 갖도록 조건을 확장합니다.

작업 내용

  • ProjectRepositoryImplownerOrParticipant(userId) 조건 헬퍼 추가 — 소유자 OR 참여자
  • findByUserIdAndStatus(내 프로젝트·대기·반려 목록 조회)와 findProjectWithCollectionsByIdAndUserId(단건 조회·수정·삭제 권한 체크)에 해당 조건 적용
  • 참여자 조건은 participants.any() 기반 EXISTS 서브쿼리로 처리하여 컬렉션 fetch join과의 카테시안 곱을 회피

체크리스트

  • 로컬에서 정상적으로 빌드 및 실행이 되는지 확인했습니다.
  • 코드 컨벤션(포맷팅, 네이밍 등)을 준수했습니다.
  • 불필요한 주석, 디버그 로그, 임시 코드를 제거했습니다.

기타

  • 이 PR은 [project] 프로젝트 삭제 시 자기참조 외래키 위반 해결 #90 → datagsm 이름 중복 해결 PR 위에 쌓인 stacked PR입니다.
  • 참여자 기능 이전에 생성된 프로젝트(participants 비어있고 user_id만 존재)는 소유자가 user_id 조건으로 그대로 접근 가능하므로 별도 데이터 마이그레이션이 필요 없습니다.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

snowykte0426
snowykte0426 previously approved these changes Jun 8, 2026
@ZaMan0806 ZaMan0806 force-pushed the fix/project-participants-permission branch from e4a7a71 to ab9fd58 Compare June 8, 2026 23:34
wwwcomcomcomcom
wwwcomcomcomcom previously approved these changes Jun 9, 2026

@wwwcomcomcomcom wwwcomcomcomcom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ownerOrParticipant() 헬퍼로 권한 조건을 한 곳에 모은 것이 좋습니다. 참여자 접근 범위 확장이 PR 의도와 일치합니다. LGTM

@ZaMan0806 ZaMan0806 force-pushed the fix/project-participants-permission branch from ab9fd58 to a32057d Compare June 9, 2026 03:08
@ZaMan0806 ZaMan0806 force-pushed the fix/project-conflict-name branch from 98869f3 to 8d28b4e Compare June 9, 2026 03:08
hongjm0912
hongjm0912 previously approved these changes Jun 9, 2026
Base automatically changed from fix/project-conflict-name to develop June 9, 2026 03:20
@ZaMan0806 ZaMan0806 dismissed stale reviews from hongjm0912, wwwcomcomcomcom, and snowykte0426 June 9, 2026 03:20

The base branch was changed.

소유자 외 participants도 내 프로젝트 조회 및 단건 조회·수정·삭제가 가능하도록 권한 조건 확장
@ZaMan0806 ZaMan0806 force-pushed the fix/project-participants-permission branch from a32057d to 8f2357a Compare June 9, 2026 03:21
@ZaMan0806 ZaMan0806 merged commit bd768b2 into develop Jun 9, 2026
1 check passed
@ZaMan0806 ZaMan0806 deleted the fix/project-participants-permission branch June 9, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants