Пример #1
0
 /**
 * Fine-tune authorized user access to this controller
 *
 * @access private
 */
 function isAuthorized($type = null, $object = null, $user = null)
 {
     if (!parent::isAuthorized($type, $object, $user)) {
         return false;
     }
     return true;
 }
Пример #2
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $excludeActions = array('admin_change_type', 'admin_unregister');
     if (in_array($this->request->params['action'], $excludeActions)) {
         $this->Security->validatePost = false;
         $this->Security->csrfCheck = false;
     }
 }
Пример #3
0
 /**
  * Before executing controller actions
  *
  * @return void
  * @access public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $noCsrfCheck = array('admin_add', 'admin_resize');
     if (in_array($this->action, $noCsrfCheck)) {
         $this->Security->csrfCheck = false;
     }
     if ($this->action == 'admin_resize') {
         $this->Security->validatePost = false;
     }
 }