コード例 #1
0
ファイル: LogsController.php プロジェクト: lognaume/webzash
 function beforeFilter()
 {
     parent::beforeFilter();
     /* Check if acccount is locked */
     if (Configure::read('Account.locked') == 1) {
         if ($this->action == 'clear') {
             $this->Session->setFlash(__d('webzash', 'Sorry, no changes are possible since the account is locked.'), 'danger');
             return $this->redirect(array('plugin' => 'webzash', 'controller' => 'logs', 'action' => 'index'));
         }
     }
 }
コード例 #2
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     Configure::load('Webzash.config', 'default', false);
     /* If third party login is active then disable methods by redirecting */
     if (Configure::read('Webzash.ThirdPartyLogin')) {
         if ($this->action == 'add' || $this->action == 'verify' || $this->action == 'resend' || $this->action == 'profile' || $this->action == 'changepass' || $this->action == 'resetpass' || $this->action == 'forgot' || $this->action == 'register' || $this->action == 'first') {
             $tpauth = new TPAuth(Configure::read('Webzash.ThirdPartyLoginSystem'));
             return $this->redirect($tpauth->siteURL());
         }
     }
     $this->Auth->allow('login', 'tplogin', 'logout', 'verify', 'resend', 'forgot', 'register');
 }
コード例 #3
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     /* Skip the ajax/javascript fields from Security component to prevent request being blackholed */
     $this->Security->unlockedFields = array('Entryitem');
     $this->Security->unlockedActions = array('email');
     /* Check if acccount is locked */
     if (Configure::read('Account.locked') == 1) {
         if ($this->action == 'add' || $this->action == 'delete') {
             $this->Session->setFlash(__d('webzash', 'Sorry, no changes are possible since the account is locked.'), 'danger');
             return $this->redirect(array('plugin' => 'webzash', 'controller' => 'entries', 'action' => 'index'));
         }
     }
 }
コード例 #4
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     /* Skip the ajax/javascript fields from Security component to prevent request being blackholed */
     $this->Security->unlockedActions = array('email');
 }
コード例 #5
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     /* Skip the ajax/javascript fields from Security component to prevent request being blackholed */
     $this->Security->unlockedFields = array('startdate', 'enddate', 'ledger_id');
 }