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()); });