function beforeFilter()
 {
     $mode = $this->Session->read("Acl.Mode");
     if (!$mode) {
         $mode = 'full';
         $this->Session->write('Acl.Mode', $mode);
     }
     $this->AclMode = $mode;
     if (!$this->_isRequestAction()) {
         // Create the root nodes if they don't exist
         $acos = $this->Aco->findByAlias("ROOT");
         if (empty($acos['Aco']['alias'])) {
             $this->Aco->create(0, NULL, "ROOT");
         }
         $aros = $this->Aro->findByAlias("PUBLIC");
         if (empty($aros['Aro']['alias'])) {
             $this->Aro->create(0, NULL, "PUBLIC");
         }
     }
     parent::beforeFilter();
 }