fix: [DM-50] 인증/인가 시스템 통합 검증 및 미구현 비즈니스 로직 전수 조사#18
Conversation
Review Summary by QodoAuthentication/Authorization System Integration Verification and Business Logic Implementation
WalkthroughsDescription• Comprehensive test suite covering authentication, authorization, and member management services with 1,754 lines of unit tests • Tests for InvitationService, ProjectService, AuthService, RedisTokenService, TokenProvider, MemberService, and CompanyService • Extracted authentication logic from AuthApiController into new AuthService class for better separation of concerns • Added member role change and removal operations to ProjectService with manager count validation and CEO protection • Enhanced OAuth2 login flow with invite flow validation to prevent CEO role selection during invitations • Improved JWT token validation by refactoring TokenProvider.validateToken() to throw exceptions instead of returning boolean • Added invite flow support with URL encoding, error handling, and company assignment logic in InvitationService • Fixed template fragment paths and corrected ProjectSettingPageData DTO field type from ProjectDetail to ProjectSummary • Enhanced project settings UI with improved role change function including self-demotion validation and confirmation dialogs • Added new API endpoints for changing project member roles and removing members with proper authorization • Improved JWT filter exception handling with explicit catch blocks for expired and invalid tokens • Updated security configuration to support invite acceptance flow with CSRF exemption and authentication requirements Diagramflowchart LR
A["AuthApiController"] -->|delegates| B["AuthService"]
B -->|uses| C["TokenProvider"]
B -->|uses| D["RedisTokenService"]
E["ProjectService"] -->|new methods| F["changeProjectRole<br/>removeProjectMember"]
G["OAuth2SuccessHandler"] -->|validates| H["InviteFlow"]
H -->|prevents| I["CEO Role Selection"]
J["InvitationService"] -->|assigns| K["Company"]
L["ProjectRepository"] -->|eager loads| M["Company"]
N["JwtAuthenticationFilter"] -->|throws| O["ExpiredJwtException<br/>UnauthorizedException"]
P["SecurityConfig"] -->|allows| Q["/invite/accept"]
File Changes1. src/test/java/kr/java/documind/domain/member/service/InvitationServiceTest.java
|
Code Review by Qodo
1.
|
|
src/main/java/kr/java/documind/domain/auth/controller/AuthApiController.java
Outdated
Show resolved
Hide resolved
src/main/java/kr/java/documind/domain/member/controller/InviteViewController.java
Outdated
Show resolved
Hide resolved
src/main/java/kr/java/documind/domain/member/service/ProjectService.java
Show resolved
Hide resolved
src/main/java/kr/java/documind/domain/member/service/ProjectService.java
Show resolved
Hide resolved
DM-50
|
@greptileai review |
관련 이슈
작업 내용
체크 리스트