Esempio n. 1
0
 /**
  * Run ACL check and redirect user automatically if user doesn't have the privilege
  * 
  * @access	public
  * @param	mixed	$resource
  * @param	string	$type 
  */
 protected final function _acl($resource, $type = null)
 {
     $status = \Hybrid\Acl::access_status($resource, $type);
     switch ($status) {
         case 401:
             \Request::show_404();
             break;
     }
 }
Esempio n. 2
0
 /**
  * Run ACL check and redirect user automatically if user doesn't have the privilege
  * 
  * @access	public
  * @param	mixed	$resource
  * @param	string	$type 
  */
 protected final function _acl($resource, $type = null)
 {
     $status = \Hybrid\Acl::access_status($resource, $type);
     switch ($status) {
         case 401:
             $this->response(array('text' => 'You doesn\'t have privilege to do this action'), 401);
             print $this->response->body;
             exit;
             break;
     }
 }