SAAS-1038 - fix bug where 403's weren't being redirected properly

This commit is contained in:
Duncan Sommerville 2015-09-02 12:23:23 -04:00
parent c45f1ddd1c
commit 9d373791c0

View file

@ -82,7 +82,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
* @param string $module * @param string $module
* @return void * @return void
**/ **/
public function setErrorPage($action, $controller = 'error', $module = null) public function setErrorPage($action, $controller = 'error', $module = 'default')
{ {
$this->_errorPage = array('module' => $module, $this->_errorPage = array('module' => $module,
'controller' => $controller, 'controller' => $controller,
@ -204,11 +204,8 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$resourceName, $resourceName,
$request->getActionName())) { $request->getActionName())) {
/** Redirect to access denied page */ /** Redirect to access denied page */
$this->getResponse() $this->setErrorPage('error403');
->setHttpResponseCode(403) $this->denyAccess(); /* This results in a 404! */
->appendBody("You don't have permission to access this resource.")
->sendResponse();
// $this->denyAccess(); /* This results in a 404! */
} }
} }
} }