* [OQRS] disable the entire controller

This commit is contained in:
Christoph Kottke
2024-06-10 14:57:10 +02:00
committed by Christoph Kottke
parent c2d888872c
commit b03872324b

View File

@@ -14,11 +14,10 @@ class Oqrs extends CI_Controller {
// Commented out to get public access
// $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('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index() {
if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->load->model('oqrs_model');
$data['stations'] = $this->oqrs_model->get_oqrs_stations();