private Map<ResourceDescriptor, Set<ResourceAccessType>> getPublicAccess(
            Set<ResourceDescriptor> resources, ProxyContext context) {
        if (!isApplicationContext(context)) {
            resources = resources.stream()
                    .filter(resource -> !resource.isHidden())
                    .collect(Collectors.toUnmodifiableSet());
        }

        return ruleService.getAllowedPublicResources(context, resources).stream()
                .collect(Collectors.toUnmodifiableMap(
                        Function.identity(),
                        resource -> ResourceAccessType.READ_ONLY));
    }
Returns USER permissions to the provided public resources.

@param resources - public resources
@param context - context
@return USER permissions
server/src/main/java/com/epam/aidial/core/server/security/AccessService.java