/**
  * 覆盖
  */
 public function replaceAction()
 {
     if ($this->_request->isPost()) {
         if (Zend_Registry::isRegistered('Zend_Navigation')) {
             $container = Zend_Registry::get('Zend_Navigation');
             if ($container instanceof Zend_Navigation_Container) {
                 $resource = new ZtChart_System_Model_Resource();
                 $resource->import($container, 3);
                 ZtChart_Model_Acl_Loader::resetCache();
                 return;
             }
         }
         $this->_helper->dialog('数据追加错误', Zend_Log::ERR);
     }
 }
 /**
  * 设置权限
  */
 public function assignAction()
 {
     if (!$this->_hasParam('role_id')) {
         return $this->render('deny');
     }
     $roleId = $this->_getParam('role_id');
     $resourceAccess = new ZtChart_System_Model_Resource();
     $allowedResourceId = $resourceAccess->findRoleSelfAndDescendants(Zend_Registry::get('user')->getRoleId());
     $roleAccess = new ZtChart_System_Model_Role();
     if ($this->_request->isPost()) {
         if ($roleAccess->saveAcl($this->_request->getPost('resource_id'), $allowedResourceId, $roleId)) {
             ZtChart_Model_Acl_Loader::resetCache();
             $this->_helper->dialog('设置权限成功', Zend_Log::INFO);
         } else {
             $this->_helper->dialog('设置权限失败', Zend_Log::WARN);
         }
     }
     $this->view->resourceId = $roleAccess->fetchResourceId($roleId);
     $this->view->allowedResourceId = $allowedResourceId;
 }