summaryrefslogtreecommitdiffstats
path: root/application/controllers/GearmanController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-08 13:45:49 +0200
committerBjörn Geiger2011-09-08 13:45:49 +0200
commiteb21e13dcdd038315d0ad1ff4941d1069af9b977 (patch)
treef01bcd0cc3e5efa56cec23f650582f6d33af8481 /application/controllers/GearmanController.php
parentsome changes (diff)
downloadpoolctrl-eb21e13dcdd038315d0ad1ff4941d1069af9b977.tar.gz
poolctrl-eb21e13dcdd038315d0ad1ff4941d1069af9b977.tar.xz
poolctrl-eb21e13dcdd038315d0ad1ff4941d1069af9b977.zip
kleine korrekturen
Diffstat (limited to 'application/controllers/GearmanController.php')
-rw-r--r--application/controllers/GearmanController.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/application/controllers/GearmanController.php b/application/controllers/GearmanController.php
index e959c42..b4b8f6c 100644
--- a/application/controllers/GearmanController.php
+++ b/application/controllers/GearmanController.php
@@ -14,13 +14,17 @@ class GearmanController extends Zend_Controller_Action
public function init()
{
- /*if (Zend_Auth::getInstance()->hasIdentity()) {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$bootstrap = $this->getInvokeArg('bootstrap');
$this->config = $bootstrap->getOptions();
$this->pbs2host = $this->config['pbs2']['host'];
$this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if(isset($this->userIDsNamespace['apikey'])) {
- $this->acl = new Poolctrl_Acl($this->pbs2host, $this->config['pbs2']['checkright'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+ $this->acl = new Poolctrl_Acl($this->pbs2host, $this->config['pbs2']['checkright'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+ }
+ if(!$this->acl->checkRight('er')) {
+ header('HTTP/1.0 403 No Right to run events');
+ die();
}
$this->gearmanServerPort = $this->config['gearman']['server']['port'];
$this->gearmanServerHost = $this->config['gearman']['server']['host'];
@@ -28,11 +32,10 @@ class GearmanController extends Zend_Controller_Action
$this->gearmanWorkerUpdateRate = $this->config['gearman']['worker']['updateRate'];
$this->gearmanClient = new GearmanClient();
$this->gearmanClient->addServer($this->gearmanServerHost);
- } else {
+ } else {
$this->_helper->redirector('login', 'auth');
return;
- }*/
- $this->_redirect('/');
+ }
}
public function indexAction()