Exemplo n.º 1
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     Configure::write('debug', 0);
     $this->layout = 'ajax';
     $this->autoRender = false;
 }
Exemplo n.º 2
0
 public function beforeFilter()
 {
     if (!empty($this->request->params['requested']) && ($this->request->params['action'] == 'get' || $this->request->params['action'] == 'admin_get')) {
         $this->Auth->allow();
     }
     parent::beforeFilter();
 }
Exemplo n.º 3
0
 /**
  * Introspect ACL models and make them available.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Aco = Admin::introspectModel('Admin.ControlObject');
     $this->Aro = Admin::introspectModel('Admin.RequestObject');
     $this->Permission = Admin::introspectModel('Admin.ObjectPermission');
     $this->Permission->cacheQueries = false;
 }
Exemplo n.º 4
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Security->unlockedActions = array('login');
     if ($_SERVER['REMOTE_ADDR'] == '132.227.84.106') {
         //debug($this->request->params);
     }
     if (empty($this->params['prefix'])) {
         $this->Auth->allow();
     }
     if ($this->request->params['action'] == 'admin_edit' and !empty($this->request->params['pass']) && is_array($this->request->params['pass']) && count($this->request->params['pass']) && current($this->request->params['pass']) == $this->Auth->user('id')) {
         $this->Auth->allow();
     }
 }
Exemplo n.º 5
0
 public function beforeFilter()
 {
     $this->Security->blackHoleCallback = 'blackhole';
     parent::beforeFilter();
     if (empty($this->params['prefix'])) {
         $this->layout = 'default';
         $this->Auth->allow();
         return;
     }
     if (Admin::hasCapability('admin.admin.index')) {
         $this->Auth->allow(array('admin_save', 'root_menu', 'admin_edit'));
     }
     if (Admin::hasCapability('admin.menus.create_menu')) {
         $this->Auth->allow(array('admin_create_page'));
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('action', 'twitter_accounts');
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow('login', 'registerUser', 'logout');
 }
Exemplo n.º 8
0
 /**
  * Before filter.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Model = Admin::introspectModel('Admin.ActionLog');
 }
Exemplo n.º 9
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     $this->layout = 'default';
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('action', 'moderate_requests');
 }
 /**
  * Controller callback
  * 
  * @return void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('title_for_layout', __d('admin', 'Permissions'));
     $this->Auth->allowe = 'admin_index';
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     // Outros códigos que precisar
 }
 public function beforeRender()
 {
     parent::beforeFilter();
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('action', 'surveys');
 }
Exemplo n.º 15
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow('login', 'add');
 }
Exemplo n.º 16
0
 /**
  * Controller callback - beforeFilter()
  * 
  * @return void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('title_for_layout', __d('admin', 'Users'));
 }
Exemplo n.º 17
0
 /**
  * Before filter.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Model = Admin::introspectModel('Admin.ItemReport');
 }
Exemplo n.º 18
0
 function beforeFilter()
 {
     parent::beforeFilter();
 }
Exemplo n.º 19
0
 /**
  * Before filter.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     // Introspect model
     if (isset($this->params['model'])) {
         $this->Model = Admin::introspectModel($this->params['model']);
         if (!$this->Model) {
             throw new ForbiddenException(__d('admin', 'Invalid Model'));
         }
     }
     // Parse request and set null fields to null
     if ($data = $this->request->data) {
         foreach ($data as $model => $fields) {
             foreach ($fields as $key => $value) {
                 if (mb_substr($key, -5) === '_null' && $value) {
                     $data[$model][str_replace('_null', '', $key)] = null;
                 }
             }
         }
         $this->request->data = $data;
     }
     // Don't validate post since data changes constantly
     $this->Security->validatePost = false;
 }