Fix for ACL REST error

This commit is contained in:
Albert Santoni 2015-02-06 14:28:25 -05:00
parent ae3c9c1f5a
commit 74e142c3d7
1 changed files with 8 additions and 5 deletions

View File

@ -118,8 +118,10 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
// If we don't have an identity and we're making a RESTful request,
// we need to do API key verification
if ($request->getModuleName() == "rest") {
$this->verifyAuth();
return;
if (!$this->verifyAuth()) {
$this->getResponse()->sendResponse();
die();
}
}
if ($controller !== 'login') {
@ -185,10 +187,11 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
if ($this->verifyAPIKey()) {
return true;
}
$this->getResponse()
->setHttpResponseCode(401)
->appendBody("ERROR: Incorrect API key.");
->setHttpResponseCode(401)
->appendBody("ERROR: Incorrect API key.");
return false;
}