public function checkPublicPerms(DataObject $node, $perm)
    {
        if ($perm == 'View') {
            if ($node->PublicAccess) {
                return true;
            }

            if ($node->InheritPerms) {
                $permParents = $this->getEffectiveParents($node);
                if (count($permParents) || $permParents instanceof IteratorAggregate) {
                    foreach ($permParents as $permParent) {
                        if ($permParent && $this->checkPublicPerms($permParent, $perm)) {
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }