Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     $authed = $this->app['session']->get('admin_authed', false);
     if ($authed) {
         $this->authed = $authed;
     } else {
         if (isset($_SERVER['REDIRECT_URL'])) {
             $this->app['session']->set('url_redirect', $_SERVER['REQUEST_URI']);
         } else {
             $this->app['session']->set('url_redirect', $this->app->url($this->request->get('_route'), $this->request->get('_route_params')));
         }
         $response = $this->redirect('admin_auth_signin');
         $response->send();
         exit;
     }
 }
Esempio n. 2
0
 public function beforeFilter(Event $event)
 {
     parent::beforeFilter($event);
     $this->Auth->deny(['index']);
 }
Esempio n. 3
0
 public function beforeFilter(Event $event)
 {
     parent::beforeFilter($event);
     $this->Auth->deny('index');
     $this->Auth->allowedActions = array('forgot', 'send', 'login', 'register', 'sso_login');
 }