/**
  * Checks authorization.
  * @return void
  */
 function startup()
 {
     parent::startup();
     if (!$this->user->isAllowed('cms', 'edit')) {
         throw new \Nette\Security\AuthenticationException("Setting Forbidden");
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
 }
Example #4
0
 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');
     }
 }
Example #5
0
 public function startup()
 {
     parent::startup();
 }
Example #6
0
 public function startup()
 {
     parent::startup();
     $this->template->translations = TranslationsModel::getAll();
     $this->template->editid = 0;
 }
Example #7
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');
 }
Example #9
0
 public function startup()
 {
     parent::startup();
     $this->verifyUser();
 }
Example #10
0
 public function startup()
 {
     parent::startup();
     $this->backlink = '';
 }
Example #11
0
 public function startup()
 {
     parent::startup();
     $this->template->redirects = RedirectModel::getAll();
     $this->template->editid = 0;
 }