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