Fix for ACL REST error
This commit is contained in:
parent
ae3c9c1f5a
commit
74e142c3d7
|
@ -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,
|
// If we don't have an identity and we're making a RESTful request,
|
||||||
// we need to do API key verification
|
// we need to do API key verification
|
||||||
if ($request->getModuleName() == "rest") {
|
if ($request->getModuleName() == "rest") {
|
||||||
$this->verifyAuth();
|
if (!$this->verifyAuth()) {
|
||||||
return;
|
$this->getResponse()->sendResponse();
|
||||||
|
die();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($controller !== 'login') {
|
if ($controller !== 'login') {
|
||||||
|
@ -185,10 +187,11 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
if ($this->verifyAPIKey()) {
|
if ($this->verifyAPIKey()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getResponse()
|
$this->getResponse()
|
||||||
->setHttpResponseCode(401)
|
->setHttpResponseCode(401)
|
||||||
->appendBody("ERROR: Incorrect API key.");
|
->appendBody("ERROR: Incorrect API key.");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue