public static Map<String, Set<ResourceAccessType>> sharedResourcesToMap(List<SharedResource> sharedResources) {
        return sharedResources.stream()
                .collect(Collectors.toUnmodifiableMap(SharedResource::getUrl, SharedResource::getPermissions));
    }
Revoke share access for provided resources. Only resource owner can perform this operation

@param bucket              - user bucket
@param location            - storage location
@param permissionsToRevoke - collection of resources and permissions to revoke access
server/src/main/java/com/epam/aidial/core/server/service/ShareService.java