From 7b2b03c869ac0218141f49db6c402f33b9cae2a5 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Fri, 28 Oct 2011 13:40:04 +0200 Subject: Statistics Right Checking --- application/controllers/StatisticsController.php | 49 ++++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/application/controllers/StatisticsController.php b/application/controllers/StatisticsController.php index a523683..7416ec5 100755 --- a/application/controllers/StatisticsController.php +++ b/application/controllers/StatisticsController.php @@ -1,16 +1,19 @@ getInvokeArg('bootstrap'); + $this->config = $bootstrap->getOptions(); + $this->pbs2host = $this->config['pbs2']['host']; $this->eventMapper = new Application_Model_EventMapper(); $this->eventcategoryMapper = new Application_Model_EventcategoryMapper(); $this->eventreportMapper = new Application_Model_EventreportMapper(); @@ -30,18 +33,16 @@ class StatisticsController extends Zend_Controller_Action } } - public function indexAction() - { - } - - public function checkrightAction() { - $this->_helper->layout->disableLayout(); - $rightShortcut = $this->_request->getParam("rightShortcut"); - $this->view->right = $this->acl->checkRight($rightShortcut); + public function indexAction() { + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } } public function categorylistAction() { - + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $poolID = $this->getRequest()->getParam('poolID'); @@ -63,7 +64,9 @@ class StatisticsController extends Zend_Controller_Action } public function runninglistAction() { - + if(!$this->acl->checkRight('er')) { + $this->_redirect('/'); + } $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $poolID = $this->getRequest()->getParam('poolID'); @@ -84,7 +87,9 @@ class StatisticsController extends Zend_Controller_Action } public function successlistAction() { - + if(!$this->acl->checkRight('er')) { + $this->_redirect('/'); + } $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $poolID = $this->getRequest()->getParam('poolID'); @@ -106,7 +111,9 @@ class StatisticsController extends Zend_Controller_Action } public function typelistAction() { - + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $poolID = $this->getRequest()->getParam('poolID'); @@ -127,19 +134,27 @@ class StatisticsController extends Zend_Controller_Action } public function categoryAction() { - + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } } public function runningAction() { - + if(!$this->acl->checkRight('er')) { + $this->_redirect('/'); + } } public function successAction() { - + if(!$this->acl->checkRight('er')) { + $this->_redirect('/'); + } } public function typeAction() { - + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } } } \ No newline at end of file -- cgit v1.2.3-55-g7522