Conversation
fix : 관리자 역할 양도 500에러 수정
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR enhances representative role transfer functionality by introducing user role-based differentiation. ADMIN users must provide Changes
Sequence DiagramssequenceDiagram
participant Client
participant RoleController
participant RoleServiceImpl
participant SecurityContext
participant RoleDAO
participant AlarmService
Client->>RoleController: POST transferRepresentativeRole(changeLineId, currentLineId?)
RoleController->>RoleServiceImpl: transferRepresentativeRole(currentLineId, changeLineId, userDetails)
RoleServiceImpl->>RoleServiceImpl: resolveCurrentLineId(userDetails)
alt User is ADMIN
RoleServiceImpl->>RoleServiceImpl: Validate currentLineId is not null
RoleServiceImpl->>RoleDAO: Fetch and update roles
RoleServiceImpl->>AlarmService: Broadcast role transfer alarm
else User is OWNER
RoleServiceImpl->>RoleServiceImpl: Log warning, use session lineId
RoleServiceImpl->>RoleDAO: Fetch and update roles
RoleServiceImpl->>AlarmService: Broadcast role transfer alarm
end
RoleServiceImpl-->>RoleController: Transfer result
alt User is not ADMIN
RoleController->>RoleController: Replace ROLE_FAMILY_OWNER with ROLE_FAMILY_MEMBER
RoleController->>SecurityContext: Update Authentication token with new authorities
RoleController->>SecurityContext: Persist context
else User is ADMIN
RoleController->>SecurityContext: Preserve existing authorities
end
RoleController-->>Client: ResponseEntity with transfer result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
개요
관련 BackLog
Resolves: (Backlog Number, ...)
PR 유형
PR Checklist
Summary by CodeRabbit
Release Notes