Removed auth check on search if public search is true
这个提交包含在:
父节点
d6acd34028
当前提交
4e618d42a2
共有 1 个文件被更改,包括 4 次插入 和 14 次删除
|
|
@ -8,24 +8,14 @@ class Search extends CI_Controller {
|
|||
parent::__construct();
|
||||
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
if($this->config->item('public_search') != TRUE) {
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Auth check
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||
if($this->user_model->validate_session()) {
|
||||
$this->user_model->clear_session();
|
||||
show_error('Access denied<p>Click <a href="'.site_url('user/login').'">here</a> to log in as another user', 403);
|
||||
} else {
|
||||
redirect('user/login');
|
||||
}
|
||||
}
|
||||
|
||||
$data['page_title'] = "Search";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
|
|
|||
正在加载…
在新工单中引用