private static Map<ResourceDescriptor, Set<ResourceAccessType>> getAutoSharedAccess(
            Set<ResourceDescriptor> resources, ProxyContext context) {
        Map<ResourceDescriptor, Set<ResourceAccessType>> result = new HashMap<>();
        for (ResourceDescriptor resource : resources) {
            String resourceUrl = resource.getUrl();
            AutoSharedData autoSharedData = context.getApiKeyData().getAttachedFiles().get(resourceUrl);
            if (autoSharedData != null) {
                result.put(resource, autoSharedData.accessTypes());
                continue;
            }
            Set<Map.Entry<String, AutoSharedData>> attachedFolders = context.getApiKeyData()
                    .getAttachedFolders().entrySet();
            for (var entry : attachedFolders) {
                String folder = entry.getKey();
                if (resourceUrl.startsWith(folder)) {
                    result.put(resource, entry.getValue().accessTypes());
                    break;
                }
            }
        }

        return result;
    }
Checks if the context represents an application rather than a user.
Applications should have access to their own published system resources.

@param context The proxy context
@return true if this appears to be an application context, false for user contexts
server/src/main/java/com/epam/aidial/core/server/security/AccessService.java