Skip to content

Comments

feat: 인증 사용자 닉네임 변경 제한 및 인증 요약 조회 Public API 추가#23

Merged
dev-ant merged 7 commits intodevfrom
feat/verfied-user-modify
Feb 17, 2026
Merged

feat: 인증 사용자 닉네임 변경 제한 및 인증 요약 조회 Public API 추가#23
dev-ant merged 7 commits intodevfrom
feat/verfied-user-modify

Conversation

@dev-ant
Copy link
Contributor

@dev-ant dev-ant commented Feb 17, 2026

📋 상세 설명

  • 사용자 정보 수정 시 인증 사용자 닉네임 변경 차단 검증 추가
  • 사용자 인증 상태/이력 조회 Public API 신규 추가
    • /api/user/verification/public/users/{userId}/summary
  • Verification 컨트롤러 전 엔드포인트에 Swagger @operation 추가
  • UserInfoResponse에 serverName, verified 필드 추가
  • 새 이미지 미업로드 시 기존 프로필 이미지 유지하도록 수정

📊 체크리스트

  • PR 제목이 형식에 맞나요 e.g. feat: PR을 등록한다
  • 코드가 테스트 되었나요
  • 문서는 업데이트 되었나요
  • 불필요한 코드를 제거했나요
  • 이슈와 라벨이 등록되었나요

@dev-ant dev-ant requested a review from Copilot February 17, 2026 11:21
@dev-ant dev-ant self-assigned this Feb 17, 2026
@dev-ant dev-ant added the ✨feature 새로운 기능 추가 label Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds functionality to prevent verified users from changing their nickname or server name, and introduces a new public API endpoint for retrieving user verification summaries. The changes also include Swagger/OpenAPI documentation updates and improvements to input validation behavior.

Changes:

  • Added validation to block verified users from changing their nicknames in the user info update flow
  • Created a new public endpoint /api/user/verification/public/users/{userId}/summary for retrieving verification status and history
  • Added Swagger @Operation annotations to all verification controller endpoints
  • Changed normalizeLimit to throw exceptions for invalid values instead of silently clamping them
  • Added serverName and verified fields to UserInfoResponse
  • Fixed profile image handling to preserve existing images when no new file is uploaded
  • Updated .gitignore to include additional environment file variations

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
UserVerificationController.java Added @Operation annotations for API documentation and new public summary endpoint
UserVerificationPublicSummaryResponse.java New response DTO for public verification summary with user status and history
UserVerificationService.java Added getUserVerificationPublicSummary method and changed normalizeLimit to throw exceptions instead of clamping
UserInfoResponse.java Added serverName and verified fields to expose verification status
UserService.java Added validation logic to block verified users from changing nicknames, with nickname format validation and availability checks
GlobalExceptionCode.java Added error codes for identity update restrictions and invalid limit values
SecurityConfig.java Configured public access for /api/user/verification/public/** endpoints
.gitignore Added additional environment file patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

String nextNickname = resolveNextNickname(request.nickname(), user.getNickname());

boolean wantsNicknameChange = !Objects.equals(nextNickname, user.getNickname());
ensureIdentityUpdateAllowed(user, wantsNicknameChange, false);
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The second parameter wantsServerNameChange is hardcoded to false, but the UserInfoUpdateRequest doesn't have a serverName field. The PR title mentions blocking server name changes for verified users, but since there's no server name change functionality in this update flow, this parameter serves no purpose here. Either the PR title is misleading, or server name change functionality needs to be implemented. Consider clarifying the intent or removing the unused parameter from this call.

Copilot uses AI. Check for mistakes.

// User
USER_INFO_UPDATE_FAILED(INTERNAL_SERVER_ERROR, "사용자 정보 수정에 실패했습니다. 잠시 후 다시 시도해주세요."),
USER_VERIFICATION_REQUIRED_FOR_IDENTITY_UPDATE(HttpStatus.BAD_REQUEST, "인증된 계정은 닉네임 또는 서버명을 변경하기 전에 재인증이 필요합니다."),
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The error message says users need "재인증" (re-verification) before changing nickname or server name. However, looking at the logic, verified users are completely blocked from making these changes. The message should clarify what action users need to take - do they need to revoke their current verification first, or is there a specific re-verification process? If they simply cannot change these fields while verified, the message should state that more clearly.

Suggested change
USER_VERIFICATION_REQUIRED_FOR_IDENTITY_UPDATE(HttpStatus.BAD_REQUEST, "인증된 계정은 닉네임 또는 서버명을 변경하기 전에 재인증이 필요합니다."),
USER_VERIFICATION_REQUIRED_FOR_IDENTITY_UPDATE(HttpStatus.BAD_REQUEST, "인증된 계정은 닉네임 또는 서버명을 변경할 수 없습니다."),

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +43
String nextNickname = resolveNextNickname(request.nickname(), user.getNickname());

boolean wantsNicknameChange = !Objects.equals(nextNickname, user.getNickname());
ensureIdentityUpdateAllowed(user, wantsNicknameChange, false);
if (wantsNicknameChange) {
validateNickname(nextNickname);
ensureNicknameAvailable(nextNickname, userId);
}
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The new validation logic for blocking verified users from changing nicknames lacks test coverage. Given that the codebase has test coverage for similar services (e.g., AuthServiceTest), consider adding tests for the following scenarios: 1) verified user attempting nickname change (should throw exception), 2) non-verified user changing nickname (should succeed), 3) verified user updating profile image without changing nickname (should succeed), 4) nickname validation and availability checks.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dev-ant dev-ant changed the title feat: 인증 사용자의 사용자명, 서버명 변경을 차단 feat: 인증 사용자 닉네임 변경 제한 및 인증 요약 조회 Public API 추가 Feb 17, 2026
@dev-ant dev-ant merged commit 4a4411f into dev Feb 17, 2026
2 checks passed
@dev-ant dev-ant deleted the feat/verfied-user-modify branch February 17, 2026 11:36
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.

1 participant