getRequest(); if (!$acl->hasRole($webUser->acl_role_id)) { $error = "Sorry, the requested user role '".$webUser->acl_role_id."' does not exist"; } if (!$acl->has($request->getControllerName())) { $error = "Sorry, the requested controller '".$request->getControllerName()."' does not exist as an ACL resource"; } if (!$acl->isAllowed($webUser->acl_role_id, $request->getControllerName(), $request->getActionName())) { $error = "Sorry, the page you requested does not exist or you do not have access"; } if (isset($error)) { Zend_Layout::getMvcInstance()->getView()->error = $error; $request->setControllerName('error'); $request->setActionName('error'); $request->setDispatched(false); } } }