Skip to content

Commit

Permalink
removed duplicate resourceService.hasResource(resource) check in vali…
Browse files Browse the repository at this point in the history
…dateCustomApplication
  • Loading branch information
sergey-zinchenko committed Nov 19, 2024
1 parent 8be9aca commit 45f6fe1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ public void validateCustomApplication(Application application, ProxyContext cont
Config config = context.getConfig();
List<ResourceDescriptor> 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());
});
Expand Down

0 comments on commit 45f6fe1

Please sign in to comment.