Merge branch 'saas-dev' into saas-dev-facebook-radio

This commit is contained in:
drigato 2015-11-24 11:22:18 -05:00
commit a2a30e5c42
23 changed files with 153 additions and 94 deletions

View file

@ -7,6 +7,15 @@ class ErrorController extends Zend_Controller_Action {
//We cannot show that.
$this->view->layout()->disableLayout();
$this->setupCSS();
// TODO: set Help button URL based on whether or not user is logged in
try {
$service_user = new Application_Service_UserService();
$service_user->getCurrentUser();
$this->view->helpUrl = Application_Common_OsPath::getBaseDir() . 'dashboard/help';
} catch (Exception $e) {
$this->view->helpUrl = HELP_URL;
}
}
public function errorAction() {

View file

@ -211,8 +211,10 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$resourceName .= $controller;
/** Check if the controller/action can be accessed by the current user */
if (!$this->getAcl()->has($resourceName)
|| !$this->getAcl()->isAllowed($this->_roleName,
if (!$this->getAcl()->has($resourceName)) {
$this->setErrorPage('error404');
$this->denyAccess();
} else if (!$this->getAcl()->isAllowed($this->_roleName,
$resourceName,
$request->getActionName())) {
/** Redirect to access denied page */