class LocalFolderAndResourceAclService implements AclService {

    @Override
    public Acl readAclById(ObjectIdentity object) throws NotFoundException {
        InternalURI targetUri = getInternalUriFor(object);
        if (repositoryService.isLocalFolder(null, targetUri.getPath())) {
            InternalURI masterResourceUri = getMasterResourceUriFor(targetUri);
            Acl masterResourceAcl = aclLookupStrategy.readAclById(masterResourceUri);
            return new JasperServerAclImpl(targetUri, new ArrayList<>(), masterResourceAcl);
        } else if (isLocalResource(targetUri)) {
            Acl parentLocalFolderAcl = aclLookupStrategy.readAclById(new InternalURIDefinition(targetUri.getParentPath(),
                    targetUri.getProtocol()));
            //local resource shouldn't have its own permissions, that's why aces is empty list.
            return new JasperServerAclImpl(targetUri, new ArrayList<>(), parentLocalFolderAcl);
        }
        return null;
    }

}