SOTA-Export was broken for Non-Admins...

这个提交包含在:
int2001 2023-08-08 17:13:01 +00:00
父节点 3961732029
当前提交 9b89651138
找不到此签名对应的密钥
GPG 密钥 ID: DFB1C13CD2DB037B

查看文件

@ -5,7 +5,7 @@ class Csv extends CI_Controller {
public function index() { public function index() {
$this->load->model('user_model'); $this->load->model('user_model');
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->load->model('modes'); $this->load->model('modes');
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -26,8 +26,11 @@ class Csv extends CI_Controller {
} }
public function export() { public function export() {
$this->load->model('csv_model'); $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'); }
$this->load->model('csv_model');
// Parameters // Parameters
$station_id = $this->security->xss_clean($this->input->post('station_profile')); $station_id = $this->security->xss_clean($this->input->post('station_profile'));
$band = $this->security->xss_clean($this->input->post('band')); $band = $this->security->xss_clean($this->input->post('band'));