private boolean canReadAccessControlContent(@Nonnull Tree acTree, @Nullable PropertyState acProperty) {
return compiledPermissions.isGranted(acTree, acProperty, Permissions.READ_ACCESS_CONTROL);
}
private ReadStatus getVersionContentReadStatus(@Nonnull Tree versionStoreTree, @Nullable PropertyState property) {
TreeLocation location = getLocation(versionStoreTree, property);
ReadStatus status = ReadStatus.DENY_THIS;
if (location != null) {
Tree tree = (property == null) ? location.getTree() : location.getParent().getTree();
if (tree != null) {
status = compiledPermissions.getReadStatus(tree, property);
} else {
// versionable node does not exist (anymore) in this workspace;
// use best effort calculation based on the item path.
long permission = (property == null) ? Permissions.READ_NODE : Permissions.READ_PROPERTY;
if (compiledPermissions.isGranted(location.getPath(), permission)) {
status = ReadStatus.ALLOW_THIS;
}
}
}
return status;