Skip to content

Commit 181b270

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 0581f66 + 7c1d2e8 commit 181b270

File tree

33 files changed

+2194
-1862
lines changed

33 files changed

+2194
-1862
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

application/controllers/Stationsetup.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function __construct()
1212
$this->load->helper(array('form', 'url'));
1313

1414
$this->load->model('user_model');
15+
if (($this->router->method == 'list_locations') && $this->user_model->authorize(2) && ((clubaccess_check(3) || clubaccess_check(6)))) { return; } // Allow Clubmembers and Clubmembers ADIF to access list_locations
1516
if(!$this->user_model->authorize(2) || !clubaccess_check(9)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
1617
}
1718

@@ -524,6 +525,7 @@ public function list_locations() {
524525
$this->load->model('stationsetup_model');
525526
$data['locations'] = $this->stationsetup_model->list_all_locations();
526527
$data['page_title'] = __("Station location list");
528+
$data['cd_p_level'] = ($this->session->userdata('cd_p_level') ?? 0);
527529
$this->load->view('interface_assets/header', $data);
528530
$this->load->view('stationsetup/locationlist');
529531
$this->load->view('interface_assets/footer');

0 commit comments

Comments
 (0)