title: I can't get navigation working correctly with Zend_Acl
body: <p>I don't know what is the problem, but the navigation menu that I'm trying to set up, is not showing up correctly ..</p>
  
  <p>All the navigation pages that contains the tag &lt; resource > are not showing up for all type of users type (admin, guest and member ), any idea why I have this problem ?</p>
  
  <p>Here's a part of my navigation.xml file :</p>
  
  <pre><code>&lt;nav&gt;
      &lt;home&gt;
          &lt;label&gt;Acceuil&lt;/label&gt;
          &lt;controller&gt;index&lt;/controller&gt;
          &lt;action&gt;index&lt;/action&gt;
      &lt;/home&gt;
  
      &lt;contact&gt;
          &lt;label&gt;Contact&lt;/label&gt;
          &lt;controller&gt;index&lt;/controller&gt;
          &lt;action&gt;contact&lt;/action&gt;
          &lt;resource&gt;index&lt;/resource&gt;
      &lt;/contact&gt;
  
      &lt;Categories&gt;
          &lt;label&gt;Categories&lt;/label&gt;
          &lt;controller&gt;index&lt;/controller&gt;
          &lt;action&gt;categories&lt;/action&gt;
      &lt;/Categories&gt;
  
      &lt;administration&gt;
          &lt;label&gt;Administration&lt;/label&gt;
          &lt;controller&gt;admin&lt;/controller&gt;
          &lt;action&gt;index&lt;/action&gt;
          &lt;resource&gt;admin&lt;/resource&gt;
          &lt;pages&gt;
                  &lt;societes&gt;
                      &lt;label&gt;Societes&lt;/label&gt;
                      &lt;controller&gt;admin&lt;/controller&gt;
                      &lt;action&gt;societes&lt;/action&gt;
                      &lt;resource&gt;admin&lt;/resource&gt;
                  &lt;/societes&gt;
          &lt;/pages&gt;
      &lt;/administration&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>, my _initAcl in Bootstrap :</p>
  
  <pre><code>$acl = new Zend_Acl();
      // add the roles
      $acl-&gt;addRole(new Zend_Acl_Role('guest'));
      $acl-&gt;addRole(new Zend_Acl_Role('user'), 'guest');
      $acl-&gt;addRole(new Zend_Acl_Role('admin'), 'user');
  
      // add the resources I have only two controller + Error
      $acl-&gt;add(new Zend_Acl_Resource('index'));
      $acl-&gt;add(new Zend_Acl_Resource('admin'));
      $acl-&gt;add(new Zend_Acl_Resource('error'));
  
      // set up the access rules
      $acl-&gt;allow(null, array('error'));
      // a guest can only read content and login
      $acl-&gt;allow('guest', 'index', array('contact', 'index', 'login', 'categories'));
      // users can also work with content
      $acl-&gt;allow('user', 'index', array('signaler', 'logout'));
      $acl-&gt;deny('user', 'index', array('inscription', 'login'));
      // administrators can do anything
      $acl-&gt;allow('admin', 'admin', array('index', 'categories', 'ajout-categorie', 'modifier-categorie', 'supprimer-categorie'));
      $acl-&gt;deny('admin', 'index', array('contact'));
  
      Zend_Registry::set('acl', $acl);
  </code></pre>
  
  <p>, my _initNavigation() in Bootstrap :</p>
  
  <pre><code>protected function _initNavigation(){
  
      $this-&gt;bootstrap('layout');
      $layout = $this-&gt;getResource('layout');
      $view = $layout-&gt;getView();
      $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
      $container = new Zend_Navigation($config);
  
      $acl = Zend_Registry::get('acl');
      $auth = Zend_Auth::getInstance();
  
      if($auth-&gt;hasIdentity()) {
          $identity = $auth-&gt;getIdentity();
          $role = strtolower($identity-&gt;role);
      }else{
          $role = 'guest';
      }
      echo $role;
      $view-&gt;navigation($container)-&gt;setAcl($acl)-&gt;setRole($role);
  }
  </code></pre>
  
  <p>And my Acl class : Application_Plugin_Acl</p>
  
  <pre><code>public function preDispatch(Zend_Controller_Request_Abstract $request){
  
      $this-&gt;acl = Zend_Registry::get('acl');
      // fetch the current user
  
      $auth = Zend_Auth::getInstance();
  
      if($auth-&gt;hasIdentity()) {
          $identity = $auth-&gt;getIdentity();
          $role = strtolower($identity-&gt;role);
      }else{
          $role = 'guest';
      }
      $controller = $request-&gt;controller;
      $action = $request-&gt;action;
      if (!$this-&gt;acl-&gt;isAllowed($role, $controller, $action)) {
          if ($role === 'guest') {
              $request-&gt;setControllerName('index');
              $request-&gt;setActionName('login');
          } else {
              $request-&gt;setControllerName('error');
              $request-&gt;setActionName('noauth');
          }
      }
  }
  </code></pre>
  
  <p>I also have this in my application.ini : pointing on the Acl Class </p>
  
  <pre><code>resources.frontController.plugins.acl = Application_Plugin_Acl
  </code></pre>
  
  <p>Sorry if the question is too long but I tried all solutions here on Stack Overflow, but nothing worked properly, and </p>