Skip to content

Feat/add user roles#16

Merged
swfs0417 merged 6 commits into
mainfrom
feat/add-user-roles
Jul 19, 2026
Merged

Feat/add user roles#16
swfs0417 merged 6 commits into
mainfrom
feat/add-user-roles

Conversation

@Mr-chimp1

@Mr-chimp1 Mr-chimp1 commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What feature does this PR add?

  • UserRole을 enum에서 is_leader/is_admin/is_president 3개의 독립적인 boolean으로 변경했습니다.

Are there any caveats or things to watch out for?

  • is_leader, is_admin, is_president가 모두 False이면 정회원입니다.
  • 세 플래그는 서로 독립적으로 저장되며, 하나가 다른 하나를 자동으로 true로 만들지는 않습니다.
  • 다만 권한 체크 시에는 User.has_admin_access 프로퍼티(is_admin 또는 is_president)를 기준으로 판단하도록 해서,
    회장(is_president)은 is_admin을 별도로 켜지 않아도 관리자 기능에 접근할 수 있습니다.
  • role 필드를 쓰던 기존 API(UserUpdateRequest, UserDetail)가
    is_leader/is_admin/is_president로 바뀌었습니다.

영향 받은 엔드포인트

  • GET /users/me
  • PATCH /users/me
  • GET /users
  • GET /users/pending
  • GET /users/{user_id}
  • PATCH /users/{user_id}
  • POST /users/{user_id}/approve
  • GET /users/me/audit-log
  • GET /users/{user_id}/audit-log
  • POST /auth/signin-dev

@swfs0417
swfs0417 self-requested a review July 18, 2026 10:21

@swfs0417 swfs0417 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

괜찮은 것 같습니다. scheme 수정이 포함되어 있어 내일 프론트엔드 작업에 영향을 줄 것 같아서, 회의 직후 머지하겠습니다.

@swfs0417
swfs0417 merged commit 08b9357 into main Jul 19, 2026
1 check passed
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.

2 participants