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

This commit is contained in:
int2001
2023-08-08 17:13:01 +00:00
parent 3961732029
commit 9b89651138

View File

@@ -5,7 +5,7 @@ class Csv extends CI_Controller {
public function index() {
$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('logbook_model');
@@ -26,8 +26,11 @@ class Csv extends CI_Controller {
}
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
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
$band = $this->security->xss_clean($this->input->post('band'));