Restrict access to statio-controler (except function stationProfileCoords)

This commit is contained in:
int2001
2025-12-08 09:39:08 +00:00
parent 250aa1b8b4
commit 9beec84099

View File

@@ -7,15 +7,15 @@
class Station extends CI_Controller
{
function __construct()
{
function __construct() {
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->model('user_model');
if (!$this->user_model->authorize(2)) {
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
if (($this->router->method == 'stationProfileCoords') && $this->user_model->authorize(2) && ((clubaccess_check(3) || clubaccess_check(6)))) { return; } // Allow Clubmembers and Clubmembers ADIF to access list_locations
if (!$this->user_model->authorize(2) || !clubaccess_check(9)) {
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}
}