File tree Expand file tree Collapse file tree
src/main/java/inha/gdgoc/domain/admin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import inha .gdgoc .domain .admin .recruit .core .dto .response .RecruitCoreApplicationDecisionResponse ;
77import inha .gdgoc .domain .admin .recruit .core .dto .response .RecruitCoreApplicationPageResponse ;
88import inha .gdgoc .domain .admin .recruit .core .service .RecruitCoreAdminService ;
9+ import inha .gdgoc .domain .recruit .core .dto .response .RecruitCoreApplicantDetailResponse ;
910import inha .gdgoc .domain .recruit .core .entity .RecruitCoreApplication ;
1011import inha .gdgoc .domain .recruit .core .enums .RecruitCoreResultStatus ;
1112import inha .gdgoc .domain .user .enums .TeamType ;
@@ -65,6 +66,12 @@ public RecruitCoreApplicationPageResponse list(
6566 );
6667 }
6768
69+ @ PreAuthorize (ORGANIZER_OR_HR_LEAD_RULE )
70+ @ GetMapping ("/{applicationId}" )
71+ public ResponseEntity <RecruitCoreApplicantDetailResponse > detail (@ PathVariable Long applicationId ) {
72+ return ResponseEntity .ok (adminService .getApplicationDetail (applicationId ));
73+ }
74+
6875 @ PreAuthorize (ORGANIZER_OR_HR_LEAD_RULE )
6976 @ PostMapping ("/{applicationId}/accept" )
7077 public ResponseEntity <RecruitCoreApplicationDecisionResponse > accept (
Original file line number Diff line number Diff line change 22
33import inha .gdgoc .domain .admin .recruit .core .dto .request .RecruitCoreApplicationAcceptRequest ;
44import inha .gdgoc .domain .admin .recruit .core .dto .request .RecruitCoreApplicationRejectRequest ;
5+ import inha .gdgoc .domain .recruit .core .dto .response .RecruitCoreApplicantDetailResponse ;
56import inha .gdgoc .domain .admin .recruit .core .dto .response .RecruitCoreApplicationDecisionResponse ;
67import inha .gdgoc .domain .recruit .core .entity .RecruitCoreApplication ;
78import inha .gdgoc .domain .recruit .core .enums .RecruitCoreResultStatus ;
@@ -43,6 +44,11 @@ public Page<RecruitCoreApplication> searchApplications(
4344 return repository .findAll (spec , pageable );
4445 }
4546
47+ @ Transactional (readOnly = true )
48+ public RecruitCoreApplicantDetailResponse getApplicationDetail (Long applicationId ) {
49+ return RecruitCoreApplicantDetailResponse .from (getApplication (applicationId ));
50+ }
51+
4652 @ Transactional
4753 public RecruitCoreApplicationDecisionResponse accept (
4854 Long applicationId ,
Original file line number Diff line number Diff line change @@ -236,11 +236,11 @@ private void validateLeadAndCorePolicy(
236236 }
237237
238238 if (editorRole == UserRole .LEAD ) {
239- if (!(targetCurrentRole == UserRole .MEMBER || targetCurrentRole == UserRole .CORE )) {
240- throw new BusinessException (GlobalErrorCode .FORBIDDEN_USER , "LEAD는 MEMBER/CORE만 수정할 수 있습니다." );
239+ if (!(targetCurrentRole == UserRole .GUEST || targetCurrentRole == UserRole . MEMBER || targetCurrentRole == UserRole .CORE )) {
240+ throw new BusinessException (GlobalErrorCode .FORBIDDEN_USER , "LEAD는 GUEST/ MEMBER/CORE만 수정할 수 있습니다." );
241241 }
242- if (!(newRole == UserRole .MEMBER || newRole == UserRole .CORE )) {
243- throw new BusinessException (GlobalErrorCode .FORBIDDEN_USER , "LEAD는 MEMBER/CORE로만 변경할 수 있습니다." );
242+ if (!(newRole == UserRole .GUEST || newRole == UserRole . MEMBER || newRole == UserRole .CORE )) {
243+ throw new BusinessException (GlobalErrorCode .FORBIDDEN_USER , "LEAD는 GUEST/ MEMBER/CORE로만 변경할 수 있습니다." );
244244 }
245245 }
246246
You can’t perform that action at this time.
0 commit comments