private function filter()
 {
     $filtro = new HB_Filter();
     //VERIFICA SESSÃO DE USUARIO E PERMISSOES
     if (AUTENTICATE) {
         $sessao = HB_Session_Helper::sessionGet();
         if (!$filtro->isPermission(new AllowAnonimos())) {
             if (!$filtro->isAutenticate($sessao)) {
                 HB_Error_Helper::Erro_401("Não autenticado.");
             }
             if (!$filtro->isPermission(new AllowPermission()) && !$filtro->isPermissionSession($sessao)) {
                 HB_Error_Helper::Erro_403('Permissão de acesso negada.');
             }
         }
     }
     //VERIFICA SEGURANÇA CSRF
     if (REQUEST_FORGERY) {
         self::$hash = HB_Security_Helper::getCsrf($this->HttpRequest);
     }
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('url');
 }
Beispiel #3
0
	public function __construct() {
		parent::__construct();
		$this->load->model('account_model', 'account');
		$this->load->model('challenge_model', 'challenge');
		$this->buckle = 100; //扣量
	}
Beispiel #4
0
 public function __destruct()
 {
     parent::__destruct();
 }