Skip to content

Conversation

@whqtker
Copy link
Member

@whqtker whqtker commented Nov 29, 2025

관련 이슈

작업 내용

소셜 로그인 사용자가 비밀번호 변경을 시도하면 예외가 발생하도록 작성했습니다.

특이 사항

리뷰 요구사항 (선택)

@coderabbitai
Copy link

coderabbitai bot commented Nov 29, 2025

Walkthrough

  1. 에러 코드 추가
    • ErrorCode 열거형에 OAUTH_USER_CANNOT_CHANGE_PASSWORD(HttpStatus.BAD_REQUEST.value(), "소셜 로그인 사용자는 비밀번호를 변경할 수 없습니다.") 상수를 추가했습니다.
  2. 비즈니스 로직 변경
    • MyPageService의 updatePassword()에 인증 타입이 이메일 기반이 아닐 경우(AuthType이 이메일이 아닐 때) OAUTH_USER_CANNOT_CHANGE_PASSWORD 예외를 던지도록 가드문을 추가했습니다.
  3. 테스트 추가
    • MyPageServiceTest에 매개변수화된 테스트를 추가해 KAKAO 및 APPLE 같은 소셜 로그인 사용자가 비밀번호 변경을 시도할 때 해당 예외가 발생하는지 검증합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 분

  • 변경 범위가 제한적이고 일관된 패턴(열거형 상수 추가, 단일 서비스에 가드문 추가, 관련 테스트 추가)이라 로직 밀도가 낮습니다.
  • 검토 시 주의할 파일/영역:
    • src/main/java/com/example/solidconnection/common/exception/ErrorCode.java — 메시지/상수 위치 충돌 여부 확인
    • src/main/java/com/example/solidconnection/siteuser/service/MyPageService.java — AuthType 판별 로직이 기대한 모든 케이스를 커버하는지 확인
    • src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java — 매개변수화된 테스트의 경계 케이스 및 예외 메시지 일치성 검증

Suggested reviewers

  • wibaek
  • lsy1307

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경의 핵심 내용을 명확하게 요약하고 있습니다. 소셜 로그인 사용자의 비밀번호 변경 불가 기능을 간결하게 표현했습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 관련 이슈 #494를 명시했고 작업 내용을 기능 단위로 설명했습니다.
Linked Issues check ✅ Passed 코드 변경사항이 이슈 #494의 목표와 일치합니다. 소셜 로그인 사용자의 비밀번호 변경 시도 시 예외를 발생시키도록 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #494의 범위 내에서 소셜 로그인 사용자 비밀번호 변경 방지 기능 구현에 집중되어 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f04cae and 1f4ccc8.

📒 Files selected for processing (1)
  • src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

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 and usage tips.

Copy link
Contributor

@Hexeong Hexeong left a comment

Choose a reason for hiding this comment

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

LGTM~!

Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 left a comment

Choose a reason for hiding this comment

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

사소한 리뷰니 approve했습니다~


@ParameterizedTest
@EnumSource(value = AuthType.class, names = {"KAKAO", "APPLE"})
void 소셜_로그인_사용자는_비밀번호를_변경할_수_없다(AuthType authType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

예외가 발생한다로 가는 게 저희 컨벤션에 맞겠네요!

Copy link
Member Author

Choose a reason for hiding this comment

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

반영했습니다 !

1f4ccc8

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: OAuth 로그인 사용자는 비밀변경 탭에 접근할 수 없다.

3 participants