/** * check the role of the connected user */ function preDispatch() { // The parent preDispatch check that a user is connected parent::preDispatch(); // Now, check the role if (!$this->user->isReviewer()) { // Forward to the "access denied" action $this->_forward("accessdenied", "index", "default"); } }
/** * Init function: local the local menu template */ function init() { parent::init(); $this->view->setFile("local_menu", "local_menu.xml"); }