src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php
protected function addPermissions(Node $node, &$doc)
    {
        if (!is_null($this->aclProvider)) {
            $roles = $this->getAclPermissions($node);
        } else {
            // Fallback when no ACL available / assume everything is accessible...
            $roles = array('IS_AUTHENTICATED_ANONYMOUSLY');
        }
        $doc['view_roles'] = $roles;
    }
protected function addPermissions(Node $node, &$doc)
    {
        if (!is_null($this->aclProvider)) {
            $roles = $this->getAclPermissions($node);
        } else {
            // Fallback when no ACL available / assume everything is accessible...
            $roles = array('IS_AUTHENTICATED_ANONYMOUSLY');
        }
        $doc['view_roles'] = $roles;
    }
protected function addPermissions ( Node $ node , & $ doc ) { if ( ! is_null ( $ this -> aclProvider ) ) { $ roles = $ this -> getAclPermissions ( $ node ) ; } else { // Fallback when no ACL available / assume everything is accessible... $ roles = array ( 'IS_AUTHENTICATED_ANONYMOUSLY' ) ; } $ doc [ 'view_roles' ] = $ roles ; }
Add view permissions to the index document

@param Node  $node
@param array $doc

@return array
Add view permissions to the index document