source/Application/Controller/Admin/NavigationTree.php
protected function _checkRights($dom)
    {
        $xPath = new DomXPath($dom);
        $nodeList = $xPath->query('//*[@rights or @norights]');

        foreach ($nodeList as $node) {
            // only allowed modules/user rights or so
            if (($req = $node->getAttribute('rights'))) {
                $perms = explode(',', $req);
                foreach ($perms as $perm) {
                    if ($perm && !$this->_hasRights($perm)) {
                        $node->parentNode->removeChild($node);
                    }
                }
                // not allowed modules/user rights or so
            } elseif (($noReq = $node->getAttribute('norights'))) {
                $perms = explode(',', $noReq);
                foreach ($perms as $perm) {
                    if ($perm && $this->_hasRights($perm)) {
                        $node->parentNode->removeChild($node);
                    }
                }
            }
        }
    }
protected function _checkRights($dom)
    {
        $xPath = new DomXPath($dom);
        $nodeList = $xPath->query('//*[@rights or @norights]');

        foreach ($nodeList as $node) {
            // only allowed modules/user rights or so
            if (($req = $node->getAttribute('rights'))) {
                $perms = explode(',', $req);
                foreach ($perms as $perm) {
                    if ($perm && !$this->_hasRights($perm)) {
                        $node->parentNode->removeChild($node);
                    }
                }
                // not allowed modules/user rights or so
            } elseif (($noReq = $node->getAttribute('norights'))) {
                $perms = explode(',', $noReq);
                foreach ($perms as $perm) {
                    if ($perm && $this->_hasRights($perm)) {
                        $node->parentNode->removeChild($node);
                    }
                }
            }
        }
    }
protected function _checkRights ( $ dom ) { $ xPath = new DomXPath ( $ dom ) ; $ nodeList = $ xPath -> query ( '//*[@rights or @norights]' ) ; foreach ( $ nodeList as $ node ) { // only allowed modules/user rights or so if ( ( $ req = $ node -> getAttribute ( 'rights' ) ) ) { $ perms = explode ( ',' , $ req ) ; foreach ( $ perms as $ perm ) { if ( $ perm && ! $ this -> _hasRights ( $ perm ) ) { $ node -> parentNode -> removeChild ( $ node ) ; } } // not allowed modules/user rights or so } elseif ( ( $ noReq = $ node -> getAttribute ( 'norights' ) ) ) { $ perms = explode ( ',' , $ noReq ) ; foreach ( $ perms as $ perm ) { if ( $ perm && $ this -> _hasRights ( $ perm ) ) { $ node -> parentNode -> removeChild ( $ node ) ; } } } } }
Removes form tree elements which does not have required user rights

@param object $dom DOMDocument
Removes form tree elements which does not have required user rights