public function beforeFilter() { parent::beforeFilter(); $user = $this->Auth->user(); $this->Auth->allow('view'); $this->set('user', $user); }
/** * Displays a view * * @param mixed What page to display * @access public */ public function beforeFilter() { parent::beforeFilter(); if (isset($this->Auth)) { $this->Auth->allow('display'); } }
function beforeFilter() { $this->Auth->allow('logout', 'reg', 'password_reset', 'view', 'acoset', 'aroset', 'permset', 'buildAcl'); parent::beforeFilter(); $this->Auth->autoRedirect = false; //debug($this->Session->read() ); }
function beforeFilter() { parent::beforeFilter(); if ('json' == $this->params['url']['ext']) { $this->RequestHandler->setContent('json', 'text/x-json'); } }
function beforeFilter() { parent::beforeFilter(); if (!empty($this->Auth)) { $this->Auth->allowedActions = array(); } }
public function beforeFilter() { $this->RequestHandler->respondAs('json'); $this->response->disableCache(); $this->Auth->allow(array('view')); parent::beforeFilter(); }
public function beforeFilter() { parent::beforeFilter(); //親(Appcontroller)をふまえた上 // ユーザー自身による登録とログアウトを許可する $this->Auth->allow('add', 'logout'); }
public function beforeFilter() { parent::beforeFilter(); if (!empty($this->Auth)) { $this->Auth->allow('display', 'ckeditor'); } }
function beforeFilter() { parent::beforeFilter(); if (!empty($this->Auth)) { $this->Auth->allowedActions = array('how_it_works', 'fetch_specific_content'); } }
/** * beforeFilter * * @return oid * @access public */ function beforeFilter() { parent::beforeFilter(); if ($this->params['prefix'] == 'admin') { $this->set('usePermission', true); } }
function beforeFilter() { $this->Auth->allow('index'); parent::beforeFilter(); $this->Auth->autoRedirect = false; //debug($this->Session->read() ); }
public function beforeFilter() { parent::beforeFilter(); if (isset($this->Auth)) { $this->Auth->allow('login', 'logout', 'setup'); } }
public function beforeFilter() { parent::beforeFilter(); if (!isset($this->params['name'])) { $this->error(ECode::$BOARD_NONE); } try { $boardName = $this->params['name']; if (preg_match("/^\\d+\$/", $boardName)) { throw new BoardNullException(); } $this->_board = Board::getInstance($boardName); } catch (BoardNullException $e) { $this->error(ECode::$BOARD_UNKNOW); } if (isset($this->params['url']['mode'])) { $mode = (int) trim($this->params['url']['mode']); if (!$this->_board->setMode($mode)) { $this->error(ECode::$BOARD_NOPERM); } } if (!$this->_board->hasReadPerm(User::getInstance())) { if (!$this->ByrSession->isLogin) { $this->requestLogin(); } $this->error(ECode::$BOARD_NOPERM); } $this->_board->setOnBoard(); $this->ByrSession->Cookie->write("XWJOKE", "hoho", false); }
function beforeFilter() { parent::beforeFilter(); if (Configure::read('Wildflower.htmlCache') and $this->params['action'] == 'view') { $this->helpers[] = 'HtmlCache'; } }
public function beforeFilter() { parent::beforeFilter(); //$this->Auth->allow('add'); // ユーザー自身による登録とログアウトを許可する $this->Auth->allow('add', 'logout'); }
function beforeFilter() { parent::beforeFilter(); Configure::write('debug', 0); $this->layout = 'ajax'; $this->autoRender = false; }
function beforeFilter() { parent::beforeFilter(); // $this->Auth->allow('*'); //$this->set('menuTab', 'kelas'); //$this->set('menuTabChild', 'kuis'); }
public function beforeFilter() { parent::beforeFilter(); if ($this->Auth->user() && $this->action != 'admin_dashboard') { $this->redirect($this->Auth->redirectUrl()); } }
function beforeFilter() { $this->logo_dir_path = WWW_ROOT . 'img' . DS . 'logo' . DS; $this->logo_dir = '/img' . DS . 'logo' . DS; $this->set('title_for_layout', __('Configurazione', true)); return parent::beforeFilter(); }
public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('add', 'login', 'logout'); $this->Auth->autoRedirect = false; //$this->Auth->allow(array('*')); }
public function beforeFilter() { parent::beforeFilter(); if ($this->action == 'admin_edit') { $this->Security->disabledFields = array('alias'); } }
public function beforeFilter() { parent::beforeFilter(); // Allow users to register and logout. // $this->Auth->allow('*'); $this->Auth->allow(array('index', 'fileUpload', 'service_order_form_new', 'techregistration', 'shipping_and_returns', 'packagesignup', 'customerSignup', 'troubleshoot', 'tariffplan', 'whytotalcable', 'contactus', 'newses', 'reseller', 'shipping', 'package', 'terms_and_conditions', 'refer', 'channels', 'registration', 'musical_night', 'seat_booking', 'area_channels', 'hazaro_konthe_sonar_bangla')); // database name must be thum_img,small_img $this->img_config = array('ch_signature' => array('image_ratio_crop' => true, 'image_resize' => true, 'image_x' => 421, 'image_y' => 295), 'c_signature' => array('image_ratio_crop' => true, 'image_resize' => true, 'image_x' => 421, 'image_y' => 295), 'file' => array(), 'id_card' => array(), 'money_order' => array(), 'parent_dir' => 'card_holder_signature', 'target_path' => array('ch_signature' => WWW_ROOT . 'card_holder_signature' . DS, 'c_signature' => WWW_ROOT . 'customer_signature' . DS, 'file' => WWW_ROOT . 'Customer_attachment' . DS, 'id_card' => WWW_ROOT . 'Customer_id_card' . DS, 'money_order' => WWW_ROOT . 'Customer_money_order' . DS)); if ($this->Auth->loggedIn()) { $isloggedin = true; } else { $isloggedin = false; } $admin_logout = false; $admin_title = "My Profile"; $this->set(compact('isloggedin', 'admin_title', 'admin_logout')); // create the folder if it does not exist if (!is_dir($this->img_config['parent_dir'])) { mkdir($this->img_config['parent_dir']); } foreach ($this->img_config['target_path'] as $img_dir) { if (!is_dir($img_dir)) { mkdir($img_dir); } } }
public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow(); $this->set('logged_user', $this->Auth->user()); $this->layout = 'cultural'; }
/** * Displays a view * * @return void * @throws NotFoundException When the view file could not be found * or MissingViewException in debug mode. */ function beforeFilter() { parent::beforeFilter(); $this->layout = 'homepage'; //allows pages without auth so you dont have 2 login :):):):):):) $this->Auth->allow('display'); }
public function beforeFilter() { parent::beforeFilter(); // what pages are allowed for non-logged-in users $this->Auth->allow('xml'); $this->Auth->allow('csv'); $this->Auth->allow('nids'); $this->Auth->allow('hids_md5'); $this->Auth->allow('hids_sha1'); $this->Auth->allow('text'); $this->Auth->allow('dot'); $this->Auth->allow('restSearch'); $this->Auth->allow('stix'); // TODO Audit, activate logable in a Controller if (count($this->uses) && $this->{$this->modelClass}->Behaviors->attached('SysLogLogable')) { $this->{$this->modelClass}->setUserData($this->activeUser); } // convert uuid to id if present in the url, and overwrite id field if (isset($this->params->query['uuid'])) { $params = array('conditions' => array('Event.uuid' => $this->params->query['uuid']), 'recursive' => 0, 'fields' => 'Event.id'); $result = $this->Event->find('first', $params); if (isset($result['Event']) && isset($result['Event']['id'])) { $id = $result['Event']['id']; $this->params->addParams(array('pass' => array($id))); // FIXME find better way to change id variable if uuid is found. params->url and params->here is not modified accordingly now } } // if not admin or own org, check private as well.. if (!$this->_isSiteAdmin()) { $this->paginate = Set::merge($this->paginate, array('conditions' => array("OR" => array(array('Event.org =' => $this->Auth->user('org')), "AND" => array(array('Event.distribution >' => 0), Configure::read('MISP.unpublishedprivate') ? array('Event.published =' => 1) : array()))))); } }
public function beforeFilter() { parent::beforeFilter(); // We're doing a backend request, require backend access $this->requireBackend(); $this->set('at_backendpanel', true); }
public function beforeFilter() { parent::beforeFilter(); // Update current semester, if needed if (date('m') < 5) { // Winter semester $this->currentSemester = date('Y') . '01'; } elseif (date('m') < 9) { // Summer semester $this->currentSemester = date('Y') . '05'; } else { // Autumn semester $this->currentSemester = date('Y') . '09'; } if ($this->Session->read('Registration.semester') != '') { $this->registrationSemester = $this->Session->read('Registration.semester'); } else { $this->registrationSemester = '201501'; $this->Session->write('Registration.semester', $this->registrationSemester); } // If unregistration is still possible for current semester, add it to the registration semesters list if (!in_array($this->currentSemester, $this->registrationSemesters) && $this->deadlines[$this->currentSemester]['drop_fee'] >= date('Ymd')) { $this->registrationSemesters[] = $this->currentSemester; sort($this->registrationSemesters); } }
/** * beforeFilter * * @return void */ public function beforeFilter() { parent::beforeFilter(); if (!empty($this->siteConfigs['editor']) && $this->siteConfigs['editor'] != 'none') { $this->helpers[] = $this->siteConfigs['editor']; } }
public function beforeFilter() { parent::beforeFilter(); if (isset($this->Auth)) { $this->Auth->allow('index', 'view'); } }
/** * beforeFilter * @return void * @access public */ function beforeFilter() { parent::beforeFilter(); if ($this->params['prefix'] == 'admin') { $this->set('usePermission', $this->UserGroup->checkOtherAdmins()); } }