공지글 수정 권한 변경(관리자 > 작성자)
This commit is contained in:
parent
ea35ea3082
commit
b1028b61c7
@ -413,15 +413,15 @@ public class localbordService {
|
||||
return ApiResponse.error(HttpStatus.UNAUTHORIZED, "비밀번호를 입력하세요");
|
||||
}
|
||||
|
||||
// 자유 게시글
|
||||
} else if("300101".equals(boardType)) {
|
||||
// 자유 게시글 && 공지글
|
||||
} else if("300101".equals(boardType) || "300103".equals(boardType)) {
|
||||
Long writerId = Long.valueOf(resultMap.getInt("authorId"));
|
||||
if(member.getId() != writerId) return ApiResponse.error(HttpStatus.UNAUTHORIZED, "권한이 없습니다");
|
||||
|
||||
// 공지글
|
||||
} else if("300103".equals(boardType)) {
|
||||
if(!"ROLE_ADMIN".equals(member.getRole())) return ApiResponse.error(HttpStatus.UNAUTHORIZED, "권한이 없습니다");
|
||||
|
||||
// } else if("300103".equals(boardType)) {
|
||||
// if(!"ROLE_ADMIN".equals(member.getRole())) return ApiResponse.error(HttpStatus.UNAUTHORIZED, "권한이 없습니다");
|
||||
//
|
||||
} else {
|
||||
log.error("게시글 카테고리 정보 없음");
|
||||
return ApiResponse.error(HttpStatus.NOT_FOUND, "해당 게시글이 없습니다");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user