-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature/board] member 권한 검사 기능 추가 #23
Conversation
[Repactoring/member] 인증 정보 없을경우 에러 처리 및 Converter 를 통한 암호화
Feature/board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깃 문제 때문에 여러번 코드를 작성하셨는데 고생하셨습니다. 이제 같이 프론트하면 되겠네요:)
public void update(Long boardId, UpdateBoardRequest request, UserDetail userInfo) { | ||
if (boardRepository.existsByIdAndMemberId( | ||
boardId, userInfo.getId()) && | ||
(userInfo.getRoleType() | ||
.equals(RoleType.LAB_LEADER) || | ||
userInfo.getRoleType() | ||
.equals(RoleType.LAB_USER))) { | ||
throw new UnauthorizedAccessException( | ||
UNAUTHORIZED_ACCESS_EXCEPTION, | ||
"권한이 없는 접근입니다." | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Board에 boardId와 memberId가 일치하고 랩장이나 유저가 맞는데 에러처리를 발생하고 있는건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오류가 있었네요 수정해서 올리겠습니다. 감사합니다.
if (userInfo.getRoleType() | ||
.equals(RoleType.LAB_LEADER) || | ||
userInfo.getRoleType() | ||
.equals(RoleType.LAB_USER)) { | ||
throw new UnauthorizedAccessException( | ||
UNAUTHORIZED_ACCESS_EXCEPTION, | ||
"권한이 없는 접근입니다." | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것도 예외처리가 부정문이 있어야할거같아요
💡 개요
📑 작업 사항
Repository
Service
Controller
converter
error
✒️ 코드 리뷰 요청 사항
✔️ 코드 리뷰 반영 사항