feat(admin): superadmin brand picker — /admin/brands 라우터#202
Open
bat1120 wants to merge 1 commit into
Open
Conversation
슈퍼어드민이 모든 가맹본부 brand 를 시뮬 가능하도록 picker 데이터 제공.
- backend/src/api/admin_brands.py 신규
- GET /admin/brands — 시뮬 가능 10종 (CS100001~CS100010) 의 brand 통합 목록
소스: ftc_brand_franchise UNION biz_brand_mapping
쿼리: q (brand/corp ILIKE), industry (canonical key), page/size (최대 200)
DISTINCT ON (brand_name, corp_name) 으로 중복 제거 (biz 우선)
- GET /admin/brands/industries — 시뮬 가능 업종 메타 (label, cs_code)
- require_superadmin dependency: master/manager 403
- backend/src/main.py: include_router 등록
- tests/test_admin_brands.py: 권한·필터·페이징·매핑 15 케이스
- docs/issues/2026-05-06-superadmin-brand-picker.md: spec + 다음 단계
(1) WIP 머지 후 _validate_and_resolve_brand bypass
(2) 프론트 brand picker UI
검증: ruff clean, pytest 15/15 PASS, E2E (real DB) 14571 brand 노출 확인.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
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.
Summary
GET /admin/brands— 시뮬 가능 10종 (CS100001~CS100010) brand 통합 목록 (FTC + biz_brand_mapping UNION, 검색·필터·페이징)GET /admin/brands/industries— 시뮬 가능 업종 메타require_superadmindependency — master/manager 403, role whitelist 강제Test plan
pytest tests/test_admin_brands.py15/15 PASSruff check/ruff formatcleanGET /admin/brands?q=스타,GET /admin/brands?industry=커피동작 확인다음 단계 (별도 PR)
_validate_and_resolve_brand(IM3-263 머지 후) 에 superadmin bypass 3줄 추가관련 문서
docs/issues/2026-05-06-superadmin-brand-picker.md33afb1aa feat(auth): superadmin role🤖 Generated with Claude Code