mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Restrict access to statio-controler (except function stationProfileCoords)
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user