public function beforeFilter() { parent::beforeFilter(); Configure::write('debug', 0); $this->layout = 'ajax'; $this->autoRender = false; }
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(); }
/** * 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; }
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(); } }
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'); }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Model = Admin::introspectModel('Admin.ActionLog'); }
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'); }
public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('login', 'add'); }
/** * Controller callback - beforeFilter() * * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->set('title_for_layout', __d('admin', 'Users')); }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Model = Admin::introspectModel('Admin.ItemReport'); }
function beforeFilter() { parent::beforeFilter(); }
/** * 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; }