Skip to content

Commit bbda68a

Browse files
committed
Fix: 파일 접근 권한 체크
기존 : "!=" 비교 변경 : "equals" 비교
1 parent 9342c47 commit bbda68a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/back/domain/file/service/FileService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private String createFileName(String fileName) {
166166

167167
// 파일 접근 권한 체크
168168
private void checkAccessPermission(FileAttachment fileAttachment, Long userId) {
169-
if (fileAttachment.getUser().getId() != userId) {
169+
if (!fileAttachment.getUser().getId().equals(userId)) {
170170
throw new CustomException(ErrorCode.FILE_ACCESS_DENIED);
171171
}
172172
}

0 commit comments

Comments
 (0)