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;
    }
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;
    }
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 ; }
Checks the permissions for a public user

@param string $perm
Checks the permissions for a public user