diff --git a/application/controllers/Csv.php b/application/controllers/Csv.php index af1b1402..de02ce43 100644 --- a/application/controllers/Csv.php +++ b/application/controllers/Csv.php @@ -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'));