Skip to content

Commit 9beec84

Browse files
committed
Restrict access to statio-controler (except function stationProfileCoords)
1 parent 250aa1b commit 9beec84

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

application/controllers/Station.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
class Station extends CI_Controller
88
{
99

10-
function __construct()
11-
{
10+
function __construct() {
1211
parent::__construct();
1312
$this->load->helper(array('form', 'url'));
1413

1514
$this->load->model('user_model');
16-
if (!$this->user_model->authorize(2)) {
17-
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
18-
redirect('dashboard');
15+
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
16+
if (!$this->user_model->authorize(2) || !clubaccess_check(9)) {
17+
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
18+
redirect('dashboard');
1919
}
2020
}
2121

0 commit comments

Comments
 (0)