Remove access to xml for all user except client 1 and 147
This commit is contained in:
parent
b28e1676b3
commit
ce0ca8bb68
@ -65,7 +65,7 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
if ($page->exportable('pdf')){
|
||||
$view->pdf = $page->filename('pdf', $request->getParams());
|
||||
}
|
||||
if ($page->exportable('xml')){
|
||||
if ($page->exportable('xml') && in_array($user->getIdClient(), array(1,147)) ){
|
||||
$view->xml = $page->filename('xml', $request->getParams());
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,15 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
||||
{
|
||||
$layout = Zend_Layout::getMVCInstance();
|
||||
if ($layout->isEnabled()) {
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$controller = $this->_request->getControllerName();
|
||||
$action = $this->_request->getActionName();
|
||||
$view = $layout->getView();
|
||||
|
||||
$page = new Scores_Export_Print($controller, $action);
|
||||
if ($page->exportable('xml') && !empty($view->exportObjet)) {
|
||||
if ($page->exportable('xml') && !empty($view->exportObjet) && in_array($user->getIdClient(), array(1,147)) ) {
|
||||
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user