REST permission fix
This commit is contained in:
parent
3e6f3abb23
commit
4b6e5671c3
|
@ -114,15 +114,17 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
if (in_array($controller, array("api", "auth", "locale", "upgrade"))) {
|
if (in_array($controller, array("api", "auth", "locale", "upgrade"))) {
|
||||||
$this->setRoleName("G");
|
$this->setRoleName("G");
|
||||||
} elseif (!Zend_Auth::getInstance()->hasIdentity()) {
|
} elseif (!Zend_Auth::getInstance()->hasIdentity()) {
|
||||||
|
|
||||||
// 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') {
|
||||||
|
|
||||||
if ($request->isXmlHttpRequest()) {
|
if ($request->isXmlHttpRequest()) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue