From 9d373791c04f27cd4655d6b868bedb0311b361b0 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 2 Sep 2015 12:23:23 -0400 Subject: [PATCH] SAAS-1038 - fix bug where 403's weren't being redirected properly --- .../application/controllers/plugins/Acl_plugin.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/controllers/plugins/Acl_plugin.php b/airtime_mvc/application/controllers/plugins/Acl_plugin.php index fb87574e0..18f1c69a5 100644 --- a/airtime_mvc/application/controllers/plugins/Acl_plugin.php +++ b/airtime_mvc/application/controllers/plugins/Acl_plugin.php @@ -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! */ } } }