remove menu Gestion where idClient is not Scores & Decisisons
This commit is contained in:
parent
c8b263041f
commit
2ac4689721
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user