kopia lustrzana https://github.com/magicbug/Cloudlog
[Auth] Changed Roles either Administrator or Operator
This is the first step in changes to the AUTH system it will have two roles - Admin - who can access all the admin tools plus log qsos - Operator - who can just access the main Cloudlog functions and their own logbooks and locationspull/1281/head
rodzic
3a36b38b82
commit
0ffe57dc63
|
@ -74,12 +74,9 @@ $config['hamqth_password'] = "";
|
|||
|
||||
$config['use_auth'] = true;
|
||||
$config['auth_table'] = "users";
|
||||
$config['auth_mode'] = "0";
|
||||
$config['auth_mode'] = "3";
|
||||
|
||||
$config['auth_level'][0] = "Anonymous";
|
||||
$config['auth_level'][1] = "Viewer";
|
||||
$config['auth_level'][2] = "Editor";
|
||||
$config['auth_level'][3] = "API User";
|
||||
$config['auth_level'][3] = "Operator";
|
||||
$config['auth_level'][99] = "Administrator";
|
||||
|
||||
/*
|
||||
|
|
|
@ -17,15 +17,13 @@ class Logbook extends CI_Controller {
|
|||
|
||||
function index()
|
||||
{
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||
if($this->user_model->validate_session()) {
|
||||
$this->user_model->clear_session();
|
||||
show_error('Access denied<p>Click <a href="'.site_url('user/login').'">here</a> to log in as another user', 403);
|
||||
} else {
|
||||
redirect('user/login');
|
||||
}
|
||||
}
|
||||
|
||||
// Check if users logged in
|
||||
$this->load->model('user_model');
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
|
@ -74,12 +74,9 @@ $config['hamqth_password'] = "";
|
|||
|
||||
$config['use_auth'] = true;
|
||||
$config['auth_table'] = "users";
|
||||
$config['auth_mode'] = "0";
|
||||
$config['auth_mode'] = "3";
|
||||
|
||||
$config['auth_level'][0] = "Anonymous";
|
||||
$config['auth_level'][1] = "Viewer";
|
||||
$config['auth_level'][2] = "Editor";
|
||||
$config['auth_level'][3] = "API User";
|
||||
$config['auth_level'][3] = "Operator";
|
||||
$config['auth_level'][99] = "Administrator";
|
||||
|
||||
/*
|
||||
|
|
Ładowanie…
Reference in New Issue