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 class Station extends CI_Controller
{ {
function __construct() function __construct() {
{
parent::__construct(); parent::__construct();
$this->load->helper(array('form', 'url')); $this->load->helper(array('form', 'url'));
$this->load->model('user_model'); $this->load->model('user_model');
if (!$this->user_model->authorize(2)) { 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
$this->session->set_flashdata('error', __("You're not allowed to do that!")); if (!$this->user_model->authorize(2) || !clubaccess_check(9)) {
redirect('dashboard'); $this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
} }
} }