From e6ed182a2d626b2714f3c945db1a737c05987a97 Mon Sep 17 00:00:00 2001 From: skytin1004 Date: Sun, 24 Mar 2024 11:40:07 +0900 Subject: [PATCH] =?UTF-8?q?[feature/Inhabas#252]=20=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EB=B0=98=EC=98=81:securitycontext=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/domain/myInfo/usecase/MyInfoServiceImpl.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/resource-server/src/main/java/com/inhabas/api/domain/myInfo/usecase/MyInfoServiceImpl.java b/resource-server/src/main/java/com/inhabas/api/domain/myInfo/usecase/MyInfoServiceImpl.java index 118ef056..b3144cf2 100644 --- a/resource-server/src/main/java/com/inhabas/api/domain/myInfo/usecase/MyInfoServiceImpl.java +++ b/resource-server/src/main/java/com/inhabas/api/domain/myInfo/usecase/MyInfoServiceImpl.java @@ -6,11 +6,9 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.inhabas.api.auth.domain.error.authException.InvalidAuthorityException; import com.inhabas.api.domain.myInfo.dto.MyBoardDto; import com.inhabas.api.domain.myInfo.dto.MyBudgetSupportApplicationDto; import com.inhabas.api.domain.myInfo.dto.MyCommentDto; @@ -31,9 +29,6 @@ public List getMyBoards(Long memberId) { List myBoardDtoList = new ArrayList<>(); myBoardDtoList.addAll(myInfoRepository.findAllBoardsByMemberId(memberId)); - if (SecurityContextHolder.getContext() == null) { - throw new InvalidAuthorityException(); - } return myBoardDtoList; } @@ -46,9 +41,6 @@ public List getMyComments(Long memberId) { List myCommentDtoList = new ArrayList<>(); myCommentDtoList.addAll(myInfoRepository.findAllCommentsByMemberId(memberId)); - if (SecurityContextHolder.getContext() == null) { - throw new InvalidAuthorityException(); - } return myCommentDtoList; } @@ -62,9 +54,6 @@ public List getMyBudgetSupportApplications(Long m budgetSupportApplicationDtoList.addAll( myInfoRepository.findAllBudgetSupportApplicationsByMemberId(memberId)); - if (SecurityContextHolder.getContext() == null) { - throw new InvalidAuthorityException(); - } return budgetSupportApplicationDtoList; }