Skip to content

feat: 프로젝트 참여 멤버 조회 api 구현 - #19

Merged
young0206 merged 6 commits into
developfrom
feat/project-member-read-api
Jul 19, 2026
Merged

feat: 프로젝트 참여 멤버 조회 api 구현#19
young0206 merged 6 commits into
developfrom
feat/project-member-read-api

Conversation

@chazy-d

@chazy-d chazy-d commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈 (Related Issue)

  • 없음

📝 작업 내용

프로젝트 참여 목록과 멤버 상세 카드를 조회할 수 있도록 프로젝트 멤버 조회 API를 추가했습니다.
또한 프로젝트 접근 권한 검증 로직을 ProjectAccessValidator로 분리하고, 프로젝트 커스텀 유형 입력 필드를 제거했습니다.

주요 검토 파일

주요 변경 파일

  • src/main/java/com/slatto/domain/project/controller/ProjectMemberController.java - 프로젝트 멤버 목록/상세 조회 엔드포인트 추가
  • src/main/java/com/slatto/domain/project/service/ProjectMemberService.java - 프로젝트 멤버 조회 비즈니스 로직 추가
  • src/main/java/com/slatto/domain/project/service/ProjectAccessValidator.java - 프로젝트 접근/관리자 권한 검증 로직 분리
  • src/main/java/com/slatto/domain/project/dto/ProjectMember*Response.java - 프로젝트 멤버 조회 응답 DTO 추가

1. 프로젝트 멤버 목록 조회 API 추가

프로젝트 참여 목록 화면에서 필요한 멤버 목록을 조회할 수 있도록 API를 추가했습니다.

GET /api/v1/projects/{projectId}/members

2. 프로젝트 멤버 상세 카드 조회 API 추가

작성자/참여자 카드 화면에서 필요한 멤버 상세 정보를 조회할 수 있도록 API를 추가했습니다.

GET /api/v1/projects/{projectId}/members/{memberId}

상세 응답에는 목록 응답 필드에 더해 이메일과 소개 정보를 포함했습니다.


3. 프로젝트 접근 권한 검증 로직 분리

프로젝트 접근 권한과 관리자 권한 검증을 여러 서비스에서 재사용할 수 있도록 ProjectAccessValidator로 분리했습니다.

  • 프로젝트 존재 여부 확인
  • 현재 사용자의 프로젝트 접근 권한 확인
  • 현재 사용자의 프로젝트 관리자 권한 확인
  • 현재 사용자의 프로젝트 멤버 조회

4. 커스텀 프로젝트 유형 입력 필드 제거

pm님과 얘기했던 대로 프로젝트 생성/수정 요청과 엔티티에서 customTypeName을 제거했습니다.

프로젝트 유형은 enum 값만 사용하도록 맞췄습니다.


5. 임시 인증 헤더 유지

아직 JWT 인증 구조가 연결되지 않았기 때문에, 기존 프로젝트 API와 동일하게 임시로 X-USER-ID 헤더에서 사용자 ID를 받아 처리하도록 구성했습니다.

X-USER-ID: 1

추후 인증 모듈이 연결되면 @AuthenticationPrincipal 또는 공통 인증 유틸 기반으로 교체할 예정입니다.


✅ PR 체크리스트

  • PR 제목은 커밋 컨벤션을 따랐습니다.
  • 관련 이슈가 없는 작업임을 본문에 명시했습니다.
  • ./gradlew compileJava로 컴파일을 확인했습니다.

테스트 참고

./gradlew compileJava는 성공했습니다.

./gradlew test는 기존 SlattoApplicationTests에서 JPA 자동설정을 제외한 상태로 전체 Spring Context를 띄우고 있어, Repository bean을 찾지 못하는 문제가 있을 수 있습니다.

💬 To Reviewers

Summary by CodeRabbit

  • 새 기능

    • 프로젝트 멤버 목록 및 멤버 상세 조회 기능을 추가했습니다.
    • 멤버의 프로필, 권한, 역할, 가입일 정보를 확인할 수 있습니다.
    • 프로젝트 접근 권한과 관리자 권한 검증을 강화했습니다.
  • 변경 사항

    • 프로젝트 생성·수정 및 응답에서 직접 입력 프로젝트 유형명 항목을 제거했습니다.
    • 활성 멤버만 조회되도록 개선했습니다.

@chazy-d chazy-d self-assigned this Jul 19, 2026
@chazy-d chazy-d added the feature 새로운 기능 추가 label Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ba2fa75-7f55-4f01-92dc-81cdc02fa874

📥 Commits

Reviewing files that changed from the base of the PR and between 9726e69 and 780cacd.

📒 Files selected for processing (15)
  • src/main/java/com/slatto/domain/project/controller/ProjectMemberController.java
  • src/main/java/com/slatto/domain/project/converter/ProjectConverter.java
  • src/main/java/com/slatto/domain/project/dto/ProjectCreateRequest.java
  • src/main/java/com/slatto/domain/project/dto/ProjectDetailResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectListResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectMemberDetailResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectMemberListResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectUpdateRequest.java
  • src/main/java/com/slatto/domain/project/entity/Project.java
  • src/main/java/com/slatto/domain/project/repository/ProjectMemberRepository.java
  • src/main/java/com/slatto/domain/project/repository/ProjectUserRoleRepository.java
  • src/main/java/com/slatto/domain/project/service/ProjectAccessValidator.java
  • src/main/java/com/slatto/domain/project/service/ProjectMemberService.java
  • src/main/java/com/slatto/domain/project/service/ProjectService.java
  • src/main/java/com/slatto/domain/user/entity/UserPortfolio.java
💤 Files with no reviewable changes (6)
  • src/main/java/com/slatto/domain/project/dto/ProjectDetailResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectCreateRequest.java
  • src/main/java/com/slatto/domain/project/converter/ProjectConverter.java
  • src/main/java/com/slatto/domain/project/dto/ProjectListResponse.java
  • src/main/java/com/slatto/domain/project/dto/ProjectUpdateRequest.java
  • src/main/java/com/slatto/domain/project/entity/Project.java

📝 Walkthrough

Walkthrough

프로젝트 멤버 목록·상세 조회 API와 접근 권한 검증을 추가했습니다. 동시에 프로젝트 및 포트폴리오의 customTypeName 필드, 저장 매핑, 요청·응답 변환을 제거했습니다.

Changes

프로젝트 멤버 조회 및 접근 검증

Layer / File(s) Summary
프로젝트 접근 검증 통합
src/main/java/com/slatto/domain/project/service/ProjectAccessValidator.java, src/main/java/com/slatto/domain/project/service/ProjectService.java
프로젝트 존재, 현재 멤버, 관리자 권한 검증을 ProjectAccessValidator로 이동하고 ProjectService가 이를 호출하도록 변경했습니다.
활성 멤버 및 역할 조회
src/main/java/com/slatto/domain/project/repository/ProjectMemberRepository.java, src/main/java/com/slatto/domain/project/repository/ProjectUserRoleRepository.java
활성 멤버와 멤버 역할을 fetch join 및 정렬 조건으로 조회하는 저장소 메서드를 추가했습니다.
멤버 응답 및 조회 API
src/main/java/com/slatto/domain/project/dto/ProjectMember*.java, src/main/java/com/slatto/domain/project/service/ProjectMemberService.java, src/main/java/com/slatto/domain/project/controller/ProjectMemberController.java
멤버 목록·상세 DTO, 역할 매핑 서비스, GET /membersGET /members/{memberId} 엔드포인트를 추가했습니다.

프로젝트 customTypeName 제거

Layer / File(s) Summary
프로젝트 유형 계약 정리
src/main/java/com/slatto/domain/project/dto/ProjectCreateRequest.java, src/main/java/com/slatto/domain/project/dto/ProjectUpdateRequest.java, src/main/java/com/slatto/domain/project/dto/ProjectDetailResponse.java, src/main/java/com/slatto/domain/project/dto/ProjectListResponse.java
생성·수정 요청과 목록·상세 응답 DTO에서 customTypeName을 제거했습니다.
프로젝트 엔티티 및 변환 정리
src/main/java/com/slatto/domain/project/entity/Project.java, src/main/java/com/slatto/domain/project/converter/ProjectConverter.java
엔티티 컬럼과 생성·수정 메서드 인자, 생성 및 응답 변환 매핑에서 customTypeName을 제거했습니다.
포트폴리오 유형 필드 정리
src/main/java/com/slatto/domain/user/entity/UserPortfolio.java
custom_type_name 컬럼 매핑 필드를 제거했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ProjectMemberController
  participant ProjectMemberService
  participant ProjectAccessValidator
  participant ProjectMemberRepository
  participant ProjectUserRoleRepository
  Client->>ProjectMemberController: X-USER-ID와 projectId 전달
  ProjectMemberController->>ProjectMemberService: 멤버 목록 또는 상세 조회 호출
  ProjectMemberService->>ProjectAccessValidator: 프로젝트 접근 검증
  ProjectMemberService->>ProjectMemberRepository: 활성 멤버 조회
  ProjectMemberService->>ProjectUserRoleRepository: 멤버 역할 조회
  ProjectMemberService-->>ProjectMemberController: 멤버 응답 DTO 반환
  ProjectMemberController-->>Client: ApiResponse 성공 응답
Loading

Possibly related PRs

  • SLAT-TO/SLATE-TO-BE#16: 동일한 프로젝트 도메인에서 customTypeName을 추가했던 변경으로, 이번 제거 작업과 직접 연결됩니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 프로젝트 멤버 조회 API 구현이라는 핵심 변경을 간결하게 잘 요약합니다.
Description check ✅ Passed 템플릿의 주요 섹션과 체크리스트를 대부분 충족하며, 변경 내용과 테스트 결과도 설명합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants