Skip to content

feat: 계정 아이디에 영문 대문자 허용 - #526

Merged
chanwoo7 merged 1 commit into
developfrom
feat/username-allow-uppercase
Oct 8, 2026
Merged

chanwoo7 merged 1 commit into
developfrom
feat/username-allow-uppercase

Conversation

@chanwoo7

@chanwoo7 chanwoo7 commented Oct 8, 2026

Copy link
Copy Markdown
Member

요약

  • 관리자 페이지에서 관리자·판매자 계정을 만들 때 아이디(username)에 영문 대문자를 허용합니다.
    • USERNAME_PATTERN: [a-z0-9._-] → [A-Za-z0-9._-](길이 4~80은 그대로)
    • 두 생성 경로(adminCreateAdmin·adminCreateSeller)가 이 규칙 하나를 함께 씁니다.
  • 아이디는 입력한 대소문자 그대로 저장하고 표시하며, 로그인은 대소문자를 구분하지 않습니다.
    • account_credential.username 컬럼 정렬이 utf8mb4_unicode_ci라 조회·unique 인덱스가 모두 대소문자를 같은 값으로 봅니다.
    • 그래서 Ops.Admin이 있으면 ops.admin 생성은 USERNAME_TAKEN(400)이고, 로그인은 ops.admin·OPS.ADMIN으로도 됩니다.
    • 마이그레이션은 없습니다.
  • SDL은 설명만 바꿨습니다(AdminCreateAdminInput.username·AdminCreateSellerInput.username).

FE 영향

  • 파괴적 변경이 없습니다. 이전에 거절되던 대문자 입력이 통과할 뿐입니다.
  • 관리자 FE의 생성 폼 검증은 이 PR이 운영에 반영된 뒤 따로 완화합니다.

테스트

  • 입력 spec 2개: 대문자 거절 케이스를 허용 케이스로 옮겼습니다.
  • auth-admin-account.service.spec(real DB): 대문자 아이디가 입력 그대로 저장되고, 대소문자만 다른 아이디는 USERNAME_TAKEN인지 확인합니다.
  • store-admin-seller.service.spec(real DB): 판매자 생성도 대소문자만 다른 아이디가 USERNAME_TAKEN인지 확인합니다.
  • account-credential.repository.spec(real DB): Ops.Admin을 ops.admin·OPS.ADMIN·Ops.Admin으로 찾는지 확인합니다(it.each 3건).
    • 로그인 서비스 spec은 repository를 mock하므로, 대소문자 무관 조회는 정렬이 실제로 작동하는 repository spec에서 고정했습니다.
  • 반증: 정규식만 되돌리면 입력 spec의 대문자 허용 케이스 2건이 실패합니다.

플랜 대조

플랜 01 불릿 상태
USERNAME_PATTERN을 [A-Za-z0-9._-]로, 주석 갱신 한 것
SDL 설명 2곳 갱신 한 것
input spec 2개: 대문자 거절 → 허용 한 것
관리자 생성: 대소문자만 다른 username 충돌 한 것
판매자 생성: 같은 케이스 한 것
대소문자 무관 로그인 계약 고정 한 것: 플랜의 credential-auth.service.spec은 mock 기반이라 account-credential.repository.spec(real DB)에 넣었습니다.
yarn validate:push → PR → 머지 게이트 → develop 머지 진행 중
머지 턴에 caquick-fe-v2 codegen 확인 머지 턴에 진행

관리자 페이지의 관리자·판매자 계정 생성에서 username 규칙에 영문 대문자를 더함.

- USERNAME_PATTERN: [a-z0-9._-] → [A-Za-z0-9._-]
- 입력한 대소문자 그대로 저장·표시, 로그인은 대소문자 무관
- 대소문자만 다른 username은 USERNAME_TAKEN — account_credential.username 정렬이 utf8mb4_unicode_ci라 사전 조회·unique 인덱스 모두 같은 값으로 봄. 마이그레이션 없음
- SDL 설명 2곳(AdminCreateAdminInput·AdminCreateSellerInput) 갱신

테스트
- input spec 2개: 대문자 거절 케이스 → 허용 케이스
- 관리자·판매자 생성: 대소문자만 다른 username 충돌 2건, 대문자 그대로 저장 1건
- AccountCredentialRepository.findCredentialByUsername: 대소문자 무관 조회 3건
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T01:20:14.002892Z cc03ba8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CaQuick/caquick-be/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32eebed9-b4bc-412d-9020-0f6c88fa8305

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

🧹 knip — dead-code 리포트

Unused exported types (1)
전체 리포트
Unused exported types (1)
RateLimitPolicy  type  src/global/rate-limit/index.ts:4:8

청소 후보(오탐 가능) · 기준 docs/guide/architecture-conventions.md

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

🩺 NestJS Doctor — 90/100 (Excellent)

진단 484건 (error 12).

Category error warning info
architecture 1 1 44
correctness 0 266 0
performance 0 36 28
schema 0 0 76
security 11 21 0
architecture / security 상위 항목
  • error architecture/architecture/no-manual-instantiation: Manual instantiation of 'OutboxRepository' detected. Use dependency injection instead.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'IAuditLogRepository'.
  • warning security/security/no-exposed-env-vars: Direct 'process.env.NODE_ENV' access in 'AuthController'. Use ConfigService instead.
  • warning security/security/require-guards-on-endpoints: Endpoint 'start' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'callback' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'refresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'logout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'devIssueToken' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'getJwks' has no @UseGuards() at class or method level.

오탐 포함 가능 · 기준 docs/guide/architecture-conventions.md

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 98% 10692/10910
🟢 Branches 92.92% 4070/4380
🟢 Functions 97.53% 2133/2187
🟢 Lines 98.57% 9728/9869

Test suite run success

4250 tests passing in 383 suites.

Report generated by 🧪jest coverage report action from cc03ba8

@chanwoo7
chanwoo7 merged commit 0e36600 into develop Oct 8, 2026
17 checks passed
@chanwoo7
chanwoo7 deleted the feat/username-allow-uppercase branch October 8, 2026 01:23
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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