protected function checkNode($resourceUri, $roles) {
        //Break up the uri on the slashes
        $nodes = preg_split('/(\\\|\\/)/', $resourceUri, -1, PREG_SPLIT_NO_EMPTY);

        //Setup the valid flag
        $valid = false;

        //Go through the config until the resource is found, or its closest node and return what valid was at that point
        $ptr = &$this->config;
        foreach($nodes as $node) {
            if (isset($ptr[$node])) {
                //Increment the pointer
                $ptr = &$ptr[$node];
                //Check if valid at this node
                if (isset($ptr['_roles'])) {
                    //If the user has any of the roles required to see the resource, set valid to true, else set it to false
                    if (0 < count(array_intersect($ptr['_roles'], $roles))) {
                        $valid = true;
                    } else {
                        $valid = false;
                    }
                }
            } else {
                break;
            }
        }

        //return the valid flag
        return $valid;
    }
protected function checkNode($resourceUri, $roles) {
        //Break up the uri on the slashes
        $nodes = preg_split('/(\\\|\\/)/', $resourceUri, -1, PREG_SPLIT_NO_EMPTY);

        //Setup the valid flag
        $valid = false;

        //Go through the config until the resource is found, or its closest node and return what valid was at that point
        $ptr = &$this->config;
        foreach($nodes as $node) {
            if (isset($ptr[$node])) {
                //Increment the pointer
                $ptr = &$ptr[$node];
                //Check if valid at this node
                if (isset($ptr['_roles'])) {
                    //If the user has any of the roles required to see the resource, set valid to true, else set it to false
                    if (0 < count(array_intersect($ptr['_roles'], $roles))) {
                        $valid = true;
                    } else {
                        $valid = false;
                    }
                }
            } else {
                break;
            }
        }

        //return the valid flag
        return $valid;
    }
protected function checkNode ( $ resourceUri , $ roles ) { //Break up the uri on the slashes $ nodes = preg_split ( '/(\\\|\\/)/' , $ resourceUri , - 1 , PREG_SPLIT_NO_EMPTY ) ; //Setup the valid flag $ valid = false ; //Go through the config until the resource is found, or its closest node and return what valid was at that point $ ptr = & $ this -> config ; foreach ( $ nodes as $ node ) { if ( isset ( $ ptr [ $ node ] ) ) { //Increment the pointer $ ptr = & $ ptr [ $ node ] ; //Check if valid at this node if ( isset ( $ ptr [ '_roles' ] ) ) { //If the user has any of the roles required to see the resource, set valid to true, else set it to false if ( 0 < count ( array_intersect ( $ ptr [ '_roles' ] , $ roles ) ) ) { $ valid = true ; } else { $ valid = false ; } } } else { break ; } } //return the valid flag return $ valid ; }
Checks whether a resource can be viewed with the given roles

@param  string  $resourceUri The uri of the resource on the report server to check security configurations for
@param  array   $roles       The array of roles that will be allowed to view this resource

@return boolean              Whether this resource is viewable by the given roles
Checks whether a resource can be viewed with the given roles