diff options
author | Michael Neves | 2012-01-28 18:28:48 +0100 |
---|---|---|
committer | Michael Neves | 2012-01-28 18:28:48 +0100 |
commit | 41be8260b43487e6efad2cb523a27a0adeed142a (patch) | |
tree | 43f671b900be547f343e8bd0a5693c743e0899f1 | |
parent | serial list tab (diff) | |
download | pbs2-41be8260b43487e6efad2cb523a27a0adeed142a.tar.gz pbs2-41be8260b43487e6efad2cb523a27a0adeed142a.tar.xz pbs2-41be8260b43487e6efad2cb523a27a0adeed142a.zip |
pbs no apikey warning
-rw-r--r-- | application/controllers/ResourceController.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php index c5dbf1a..2a7b3e9 100644 --- a/application/controllers/ResourceController.php +++ b/application/controllers/ResourceController.php @@ -192,15 +192,17 @@ class ResourceController extends Zend_Controller_Action { } public function getprebootserialsAction(){ - list($rightroles) = $this->rightrolesMapper->findBy(array('rightID' => '40', 'roleID' => $this->membership->getRoleID())); - if($rightroles == null) { - header('HTTP/1.0 403 No Right to Create Preboots'); - die(); - } $apikey = $this->_request->getParam('apikey'); if($apikey == "") { - header('HTTP/1.0 400 No API-Key'); + header('Content-Type: text/html'); + echo "No API Key\n"; + die(); + } + + list($rightroles) = $this->rightrolesMapper->findBy(array('rightID' => '40', 'roleID' => $this->membership->getRoleID())); + if($rightroles == null) { + header('HTTP/1.0 403 No Right to Create Preboots'); die(); } |