/** * Checks authorization. * @return void */ function startup() { parent::startup(); if (!$this->user->isAllowed('cms', 'edit')) { throw new \Nette\Security\AuthenticationException("Setting Forbidden"); } }
public function startup() { parent::startup(); $this->absoluteUrls = TRUE; $admin_config = ConfigAdapterIni::load(APP_DIR . '/config/admin.ini'); foreach ($admin_config['admin'] as $var => $value) { Environment::setVariable($var, $value); } Environment::setVariable('themesDir', 'themes'); $method = $this->getRequest()->getMethod(); if ($method == 'GET') { $data = $method = $this->getRequest()->getParams(); if (isset($data['rsd'])) { header('Content-Type: text/xml'); $this->view = 'rsd'; } elseif (isset($data['wlw'])) { header('Content-Type: text/xml'); $this->view = 'wlw'; } } else { if (!isset($HTTP_RAW_POST_DATA)) { $HTTP_RAW_POST_DATA = file_get_contents('php://input'); } $data = $HTTP_RAW_POST_DATA; file_put_contents('xmlrpc.txt', $data, FILE_APPEND); $this->formatCallbacks($this->methods); $server = new IXR_Server($this->methods, $data); } }
function startup() { parent::startup(); //vypnutie debugeru + profileru $config = NEnvironment::getConfig()->database; $config->profiler = false; $config->lazy = false; dibi::connect($config); //NDebug::enable( TRUE, LOG_DIR); }
public function startup() { parent::startup(); $this->storeRequest(); $user = Environment::getUser(); if (!$user->isAuthenticated()) { $this->redirect(":Admin:Login:default"); } try { $this->checkAuthorization(); } catch (AuthenticationException $e) { $this->forward(':Admin:Secure:deny'); } }
public function startup() { parent::startup(); }
public function startup() { parent::startup(); $this->template->translations = TranslationsModel::getAll(); $this->template->editid = 0; }
public function startup() { parent::startup(); $this->template->prog_mode = ACL_PROG_MODE ? true : false; $this->template->current = $this->getPresenter()->getName(); }
function startup() { parent::startup(); $this->model = $this->getService('ProductTemplateGroupModel'); }
public function startup() { parent::startup(); $this->verifyUser(); }
public function startup() { parent::startup(); $this->backlink = ''; }
public function startup() { parent::startup(); $this->template->redirects = RedirectModel::getAll(); $this->template->editid = 0; }