public function startup()
 {
     parent::startup();
     $session = $this->getSession('mysection');
     $session->user = '******';
     dump($session);
 }
Esempio n. 2
0
 protected function startup()
 {
     parent::startup();
     if (!$this->user->isInRole(UserManager::ROLE_ADMIN)) {
         throw new BadRequestException();
     }
 }
Esempio n. 3
0
 public function startup()
 {
     parent::startup();
     if ($this->user->loggedIn) {
         $this->redirect('Admin:directives');
     }
 }
Esempio n. 4
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isAllowed('Admin', 'can')) {
         throw new \Nette\Application\ForbiddenRequestException();
     }
 }
Esempio n. 5
0
 protected function startup()
 {
     parent::startup();
     if (!$this->user->loggedIn) {
         $this->redirect('Homepage:');
     }
 }
Esempio n. 6
0
 public function startup()
 {
     parent::startup();
     // if (!$this->user->isLoggedIn()) {
     // 	$this->redirect('Sign:in');
     // }
 }
Esempio n. 7
0
 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->redirect('Login:');
     }
 }
 protected function startup()
 {
     parent::startup();
     $this->oModel = $this->context->getService("article");
     $this->oMenu = $this->context->getService("menu");
     $this->oUser = $this->context->getService("userss");
 }
Esempio n. 9
0
 public function startup()
 {
     parent::startup();
     if (!$this->getUser()->isLoggedIn()) {
         $this->redirect('Sign:in', array('backlink' => $this->storeRequest()));
     }
 }
 protected function startup()
 {
     if (!$this->getUser()->isLoggedIn()) {
         $this->redirect(':Sign:in');
     }
     parent::startup();
 }
Esempio n. 11
0
 public function startup()
 {
     parent::startup();
     // TODO: Change the autogenerated stub
     $this->steelCheck('Pro správu tagů musíš být přihlášen.', []);
     $this->template->title = 'Tagy';
 }
Esempio n. 12
0
 public function startup()
 {
     parent::startup();
     if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) {
         $this->error();
     }
 }
Esempio n. 13
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isInRole('admin')) {
         $this->flashMessage('Pro přístup do sekce "nástroje" musíte být přihlášen jako uživatel s administrátorskými právy.', 'fr');
         $this->redirect('Sign:in');
     }
 }
Esempio n. 14
0
 /** MapPresenter constructor*/
 protected function startUp()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->flashMessage('Pro přístup k mapám je nutné se přihlásit.', 'danger');
         $this->redirect('Login:');
     }
 }
Esempio n. 15
0
 public function startup()
 {
     parent::startup();
     if (!$this->getUser()->isLoggedIn()) {
         $this->flashMessage("Pro vstup do této sekce je vyžadováno přihlášení.");
         $this->redirect(":Homepage:");
     }
 }
 public function startup()
 {
     parent::startup();
     // TODO: Change the autogenerated stub
     if (!$this->session->isStarted()) {
         $this->session->start();
     }
 }
Esempio n. 17
0
 protected function startup()
 {
     parent::startup();
     $parameters = $this->context->parameters;
     $this->appDir = $parameters['appDir'];
     $this->contactEmail = $parameters['contactEmail'];
     $this->registerFormExtendingMethods();
 }
 /**
  * Verify token.
  */
 public function startup()
 {
     parent::startup();
     $token = $this->getParameter('token');
     if (!$this->usersRepository->verifyToken($token)) {
         $this->flashMessage('The token is invalid.', 'alert alert-danger');
         $this->redirect('LogIn:default');
     }
 }
Esempio n. 19
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->flashMessage("To access Steel, you must be Steel.");
         $this->redirect('Sign:in');
     }
     $this->template->title = "Steelasdf";
 }
Esempio n. 20
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isInRole('admin')) {
         $this->flashMessage('Akci nelze provést, protože nemáte oprávnění administrátora. ' . 'Přihlaste se administrátorským účtem.', 'error');
         $this->redirect("Sign:in", array('backlink' => $this->storeRequest()));
     }
     $this->formLatteAddress = __DIR__ . "/../templates/form.latte";
 }
Esempio n. 21
0
 public function startup()
 {
     parent::startup();
     if ($this->user->isLoggedIn()) {
         if ($this->getParameter('id') != $this->user->getId()) {
             $this->redirect('Sign:in');
         }
     }
 }
Esempio n. 22
0
 protected function startup()
 {
     parent::startup();
     //....
     // get settings
     $this->settings = $this->settingRepository->getSettings();
     $arrsdfsdfsdf = ['AoAco' => 'asdas', 'naeco' => 'asdas', 'naecaovbnm' => 'asdas'];
     $arrr = ['a' => '4', 'b' => 'c'];
     $a = ['a' => 1];
 }
Esempio n. 23
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->loggedIn) {
         $this->redirect("Sign:in", ["backlink" => $this->storeRequest()]);
     }
     $this->translator->setLocale("en");
     if ($this->getParameter("no_layout", false)) {
         $this->setLayout(false);
     }
 }
Esempio n. 24
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->loggedIn) {
         $this->flashMessage('Zabezpečená sekce. Přihlašte se prosím.', 'error');
         $this->redirect('Public:directives');
     }
     $this->docExt = $this->context->parameters['docExt'];
     $this->setPostLimit();
     $this->setFileLimit();
     $this->checkPostLimit();
 }
Esempio n. 25
0
 /**
  * For Logged and verified
  */
 public function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->flashMessage($this->translator->translate('ui.you-must-by-logged-log-in-please'), 'alert alert-info');
         $this->redirect('LogIn:default');
     }
     if ($this->user->isInRole('unverified')) {
         $this->flashMessage('ui.you-must-by-verified-please-verify-your-account', 'alert alert-warning');
         $this->redirect('LogIn:default');
     }
 }
Esempio n. 26
0
 public function startup()
 {
     parent::startup();
     $user = $this->getUser();
     if (!$user->isLoggedIn()) {
         if ($user->getLogoutReason() === User::INACTIVITY) {
             //$this->flashMessage($this->tt("securityModule.loginControl.messages.outCosInactive"), self::FM_WARNING);
         }
         $backlink = $this->storeRequest();
         $this->redirect(':Security:Auth:in', ['backlink' => $backlink]);
     }
 }
Esempio n. 27
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->redirect(':Sign:in');
     }
     $this->identity = $this->user->identity;
     $this->userEntity = $this->userService->get($this->identity->id);
     $this->navigation = new NavigationCollection($this->translator);
     $this->template->navigation = $this->navigation;
     $this->template->systemName = systemName;
     $this->template->author = $this->userEntity->getEmail();
 }
Esempio n. 28
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         if (!($this->getName() == 'AdminUser' && $this->getAction() == 'login')) {
             $this->redirectUrl($this->genUrl('admin/prihlasit'));
         }
     } else {
         if ($this->getName() == 'AdminUser' && $this->getAction() == 'login') {
             $this->redirectUrl($this->genUrl('admin'));
         }
     }
 }
Esempio n. 29
0
 /**
  *
  */
 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn() || !$this->user->isInRole('admin')) {
         $this->flashMessage('Ke vstupu do administrace nemáte oprávnění!', 'danger');
         $this->redirect('Sign:in');
     }
     $explode = explode(':', $this->presenter->name);
     $pieces = preg_split('/(?=[A-Z])/', lcfirst(end($explode)));
     $presenterName = strtolower(implode('_', $pieces));
     $this->tableName = strtolower($presenterName);
     $this->formFactory->setPresenter($this);
     $this->gridFactory->setPresenter($this);
 }
Esempio n. 30
0
 public function startup()
 {
     parent::startup();
     Gallery::extensionMethod('getImages', function (Gallery $gallery) {
         return $this->gallery->getImages($gallery->idGallery, $gallery->lang);
     });
     //todo: Metoda getImages vrace pouze pole a ne callback?
     Gallery::extensionMethod('getImage', function (Gallery $gallery) {
         foreach ($this->gallery->getImages($gallery->idGallery, $gallery->lang) as $path => $image) {
             return $path;
         }
     });
     $this->setActive('Galerie');
 }