summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-28 13:40:04 +0200
committerBjörn Geiger2011-10-28 13:40:04 +0200
commit7b2b03c869ac0218141f49db6c402f33b9cae2a5 (patch)
tree1e1fe321046fe3f055d7f3626b3190cdf0c07ae5
parentcontrollerWorker force korrigiert (diff)
downloadpoolctrl-7b2b03c869ac0218141f49db6c402f33b9cae2a5.tar.gz
poolctrl-7b2b03c869ac0218141f49db6c402f33b9cae2a5.tar.xz
poolctrl-7b2b03c869ac0218141f49db6c402f33b9cae2a5.zip
Statistics Right Checking
-rwxr-xr-xapplication/controllers/StatisticsController.php49
1 files 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 @@
<?php
class StatisticsController extends Zend_Controller_Action
{
- protected $acl;
protected $config;
protected $pbs2host;
protected $eventMapper;
protected $eventcategoryMapper;
protected $eventreportMapper;
+ protected $acl;
public function init()
{
+ $bootstrap = $this->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