summaryrefslogtreecommitdiffstats
path: root/application/controllers/GearmanController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-08 17:28:22 +0200
committerBjörn Geiger2011-08-08 17:28:22 +0200
commitc1c47b2010a2e3453139501dfa4accf48bb6a92c (patch)
tree16657ccd1e93dbae8e9c77c9399c4613cd99e1af /application/controllers/GearmanController.php
parentkleine änderungen (diff)
downloadpoolctrl-c1c47b2010a2e3453139501dfa4accf48bb6a92c.tar.gz
poolctrl-c1c47b2010a2e3453139501dfa4accf48bb6a92c.tar.xz
poolctrl-c1c47b2010a2e3453139501dfa4accf48bb6a92c.zip
ACL hinzugefügt
Diffstat (limited to 'application/controllers/GearmanController.php')
-rw-r--r--application/controllers/GearmanController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/application/controllers/GearmanController.php b/application/controllers/GearmanController.php
index dcad3dc..608e88c 100644
--- a/application/controllers/GearmanController.php
+++ b/application/controllers/GearmanController.php
@@ -5,15 +5,19 @@ class GearmanController extends Zend_Controller_Action
protected $gearmanClient;
protected $config;
protected $pbs2host;
+ protected $userIDsNamespace;
+ protected $acl;
public function init()
{
-
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->gearmanClient = new GearmanClient();
$this->gearmanClient->addServer('127.0.0.1');
} else {