public function executeIndex(sfWebRequest $request) { if (!$this->getUser()->getGuardUser()->hasPermission('admin') && !$this->getUser()->getGuardUser()->hasPermission('editor')) { $this->redirect('@homepage'); } parent::executeIndex($request); }
public function preExecute() { $this->configuration = new sfGuardUserGeneratorConfiguration(); if (!$this->getUser()->hasCredential($this->configuration->getCredentials($this->getActionName()))) { $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action')); } $this->dispatcher->notify(new sfEvent($this, 'admin.pre_execute', array('configuration' => $this->configuration))); $this->helper = new sfGuardUserGeneratorHelper(); parent::preExecute(); }
public function executeNew(sfWebRequest $request) { //$this->setLayout('popuplayout'); parent::executeNew($request); }