Repository navigation
feat(member): 닉네임 변경 및 검증(길이·금칙어·중복) 구현 - #78
Merged
Merged
Conversation
- ADR 0014: 형식 규칙(2~10자, 한글·영문·숫자·_), 금칙어 리소스 번들 (LDNOOBW CC BY 4.0 + 직접 작성, 포함/정확 일치/허용 목록), 대소문자 무시 중복 - 스펙 019: PATCH /members/me 닉네임 필드(보낸 필드만 수정), 사용 가능 여부 확인 API, V27 공백→_ 이관·lower 유니크 인덱스 Refs #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- V27: 기존 닉네임 공백→_ 변환, uq_member_nickname을 lower(nickname) 유니크 인덱스로 교체 - 후보 풀 990개 _ 형식으로 변환 - 대소문자 무시·본인 제외 중복 조회 메서드 추가 Refs #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LDNOOBW(5faf2ba, CC BY 4.0) ko·en + 직접 작성 항목을 포함/정확 일치/허용 목록 리소스로 가공(출처 표기 포함) - ProhibitedWords: 비교 키 정규화, 허용 단어가 덮는 일치만 무시 - NicknamePolicy: NFC·strip 정규화, 길이→문자→금칙어 순 판정 - 허용 목록 판정을 위치 기반으로 정정(스펙·ADR 반영) Refs #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GET /members/nickname/availability: 위반도 200 + available·reason - NicknameService: 정책 판정 후 대소문자 무시·본인 제외 중복 검사 - 닉네임 에러 코드 MEMBER_400_2~4, MEMBER_409_3 추가 Refs #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#77이 V27(sort_tags 이름 변경)을 먼저 사용해, develop 위로 rebase하며 닉네임 공백 이관·대소문자 무시 유니크 마이그레이션을 V28로 옮긴다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
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. Comment |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
사용자가 닉네임을 직접 바꿀 수 있게 하고, 형식·금칙어·중복 검증을 적용한다. 지금까지는 가입할 때 후보 풀에서 자동으로 부여만 됐다. 자유 입력을 열면서 욕설·비속어·운영자 사칭을 막는 규칙을 함께 넣는다. 닉네임의 단어 구분은 공백에서
_로 바꾸고, 기존 닉네임도 이관한다.변경 사항
API
PATCH /api/v1/members/me에nickname필드를 추가했다. 부분 수정이라 보내지 않은 필드는 그대로이고,drivingGoal: null·""는 기존처럼 지운다. 하나라도 검증에 실패하면 둘 다 저장하지 않는다.GET /api/v1/members/nickname/availability?nickname=을 추가했다. 저장 없이 같은 판정만 한다. 규칙을 어겨도 200을 주고available=false와 사유 코드(reason)·메시지를 준다.검증 규칙 (
NicknamePolicy)MEMBER_400_2"2자 이상 10자 이하만 사용 가능해요."_만 허용하고,_는 처음·끝·연속에 올 수 없다. 위반 시MEMBER_400_3.src/main/resources/nickname/)로 검사한다. 위반 시MEMBER_400_4._·숫자·특수문자를 제거해서 우회를 막는다.5faf2ba기준으로 한 번 가공)와 직접 작성 목록을 쓴다. 출처는 파일 상단에 표기했다.MEMBER_409_3. 동시 변경으로 유니크 제약에 걸려도 500이 아니라 409를 준다.이관 (V28)
member.nickname의 공백을_로 바꾼다(예:차근차근 토끼→차근차근_토끼).lower(nickname)유니크 인덱스로 바꾼다._형식으로 바꿨다. 전부NicknamePolicy를 통과한다.문서
배포·앱 연동 참고
_). 앱 팀에 공유가 필요하다.reason·message로 안내 문구를 보여줄 수 있다.관련 스펙 / 이슈
docs/specs/020-nickname-change.md· ADRdocs/adr/0014-nickname-validation-and-profanity-filter.md체크리스트
./gradlew test통과 (524개)🤖 Generated with Claude Code