Skip to content

Commit 3fa48e3

Browse files
committed
refactor(FileService): 운영진 디렉토리 체크 로직 작성
1 parent a6e3c61 commit 3fa48e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/page/clab/api/global/common/file/application/FileService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ public String buildPath(String baseDirectory, Long... additionalSegments) {
172172
for (Long segment : additionalSegments) {
173173
pathBuilder.append(File.separator).append(segment);
174174
}
175+
if (checkExecutivesDirectory(baseDirectory)) {
176+
return pathBuilder.toString();
177+
}
175178
pathBuilder.append(File.separator).append(currentMemberId);
176179
return pathBuilder.toString();
177180
}
@@ -196,6 +199,10 @@ public void validatePathVariable(String path) throws InvalidPathVariableExceptio
196199
}
197200
}
198201

202+
private boolean checkExecutivesDirectory(String baseDirectory) {
203+
return baseDirectory.equals("executives");
204+
}
205+
199206
private void validateNoticePath(String[] pathParts) throws InvalidPathVariableException, PermissionDeniedException {
200207
Long activityGroupId = parseId(pathParts[1], "활동 ID가 유효하지 않습니다.");
201208
String memberId = externalRetrieveMemberUseCase.getCurrentMemberId();

0 commit comments

Comments
 (0)