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