remove menu Gestion where idClient is not Scores & Decisisons

This commit is contained in:
Michael RICOIS 2014-06-26 10:27:26 +00:00
parent c8b263041f
commit 2ac4689721

View File

@ -17,7 +17,16 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
$view = $layout->getView();
$config = include APPLICATION_PATH . '/configs/menu.config.php';
$container = new Zend_Navigation($config);
$view->navigation($container);
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if ($user->idClient != 1) {
$gestionPage = $container->findBy('controller', 'gestion');
$container->removePage($gestionPage, true);
}
$view->navigation($container);
}
}