Skip to content

[Feat] 팀명 수정 API 추가#60

Merged
LeeJeongHeon02 merged 1 commit into
devfrom
feat/team-rename-api
Jul 21, 2026
Merged

[Feat] 팀명 수정 API 추가#60
LeeJeongHeon02 merged 1 commit into
devfrom
feat/team-rename-api

Conversation

@LeeJeongHeon02

Copy link
Copy Markdown
Contributor

Summary

  • PATCH /api/v1/teams/{teamId} 추가 — 팀명을 수정한다.
  • 권한: 팀의 OWNER/ADMIN만 가능, MEMBER는 새로 추가한 TEAM_SETTINGS_FORBIDDEN(TEAM_403_004)으로 403.
    • 기존 TEAM_MANAGEMENT_FORBIDDEN("팀원을 관리할 권한이 없습니다")은 팀원 관리 전용 문구라 팀 설정 변경(CAMPAIGN_MANAGEMENT_FORBIDDEN과 같은 패턴)에는 맞지 않아 별도 코드로 분리했다.
  • Team.rename()은 이미 존재했지만 호출부가 없던 메서드다 — 이번에 처음 연결했다.
  • changeRole/removeMember/leaveTeam과 동일한 패턴: lockTeam(비관적 락) → requireActiveMemberrequireActiveTeam → 역할 검사.
  • Swagger 문서(TeamControllerDocs) 및 클래스 레벨 설명 갱신.

Test plan

  • TeamMemberManagementServiceTestrenameTeam_allowsOwnerAndAdminButRejectsMember 추가 (OWNER/ADMIN 성공, MEMBER 403 확인) 및 mutationsRejectInactiveTeam에 rename 케이스 추가 (팀이 ACTIVE가 아니면 403)
  • 전체 테스트 스위트 통과 (298개, 0 실패)

🤖 Generated with Claude Code

OWNER/ADMIN이 팀명을 변경할 수 있는 PATCH /api/v1/teams/{teamId}를 추가한다.
MEMBER가 시도하면 새로 추가한 TEAM_SETTINGS_FORBIDDEN(TEAM_403_004)으로 거부한다
(TEAM_MANAGEMENT_FORBIDDEN은 "팀원 관리" 권한 문구라 팀 설정 변경에는 의미가 맞지 않아
별도 코드로 분리했다).

changeRole/removeMember/leaveTeam과 동일한 패턴을 따른다 - lockTeam으로 비관적 락을
잡고, requireActiveMember/requireActiveTeam으로 소속·활성 상태를 검증한 뒤 역할을 확인한다.
Team 엔티티의 기존 rename() 메서드(호출부 없이 방치돼 있던)를 그대로 사용했다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@LeeJeongHeon02, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9c9e6270-bd8b-4c74-85e0-7604d8911006

📥 Commits

Reviewing files that changed from the base of the PR and between 8dabade and 06daae5.

📒 Files selected for processing (7)
  • src/main/java/com/shinhan/klljs/domain/team/controller/TeamController.java
  • src/main/java/com/shinhan/klljs/domain/team/controller/TeamControllerDocs.java
  • src/main/java/com/shinhan/klljs/domain/team/dto/TeamRenameRequest.java
  • src/main/java/com/shinhan/klljs/domain/team/dto/TeamRenameResponse.java
  • src/main/java/com/shinhan/klljs/domain/team/exception/TeamErrorCode.java
  • src/main/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementService.java
  • src/test/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementServiceTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/team-rename-api

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.

❤️ Share

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

@LeeJeongHeon02
LeeJeongHeon02 merged commit af4d232 into dev Jul 21, 2026
1 of 2 checks passed
@LeeJeongHeon02
LeeJeongHeon02 deleted the feat/team-rename-api branch July 21, 2026 03:42
@LeeJeongHeon02 LeeJeongHeon02 changed the title feat: 팀명 수정 API 추가 [Feat] 팀명 수정 API 추가 Jul 21, 2026
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.

1 participant