From 45f6fe12cffe76f86765e4298a9133a8743bb2d8 Mon Sep 17 00:00:00 2001 From: Sergey Zinchenko Date: Tue, 19 Nov 2024 15:06:57 +0100 Subject: [PATCH] removed duplicate resourceService.hasResource(resource) check in validateCustomApplication --- .../epam/aidial/core/server/service/ApplicationService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/java/com/epam/aidial/core/server/service/ApplicationService.java b/server/src/main/java/com/epam/aidial/core/server/service/ApplicationService.java index 1dcfd798..fcd672e0 100644 --- a/server/src/main/java/com/epam/aidial/core/server/service/ApplicationService.java +++ b/server/src/main/java/com/epam/aidial/core/server/service/ApplicationService.java @@ -228,8 +228,7 @@ public void validateCustomApplication(Application application, ProxyContext cont Config config = context.getConfig(); List files = CustomApplicationUtils.getFiles(config, application, encryptionService, resourceService); - files.stream().filter(resource -> !(resourceService.hasResource(resource) - && context.getProxy().getAccessService().hasReadAccess(resource, context))) + files.stream().filter(resource -> !(context.getProxy().getAccessService().hasReadAccess(resource, context))) .findAny().ifPresent(file -> { throw new HttpException(BAD_REQUEST, "No read access to file: " + file.getUrl()); });