コード例 #1
0
 public function executeIndex(sfWebRequest $request)
 {
     if (!$this->getUser()->getGuardUser()->hasPermission('admin') && !$this->getUser()->getGuardUser()->hasPermission('editor')) {
         $this->redirect('@homepage');
     }
     parent::executeIndex($request);
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: ndachez/dachez
 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();
 }
コード例 #3
0
ファイル: actions.class.php プロジェクト: vcgato29/poff
 public function executeNew(sfWebRequest $request)
 {
     //$this->setLayout('popuplayout');
     parent::executeNew($request);
 }