[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 locations
pull/1281/head
Peter Goodhall 2021-11-08 15:28:16 +00:00
rodzic 3a36b38b82
commit 0ffe57dc63
3 zmienionych plików z 11 dodań i 19 usunięć

Wyświetl plik

@ -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";
/*

Wyświetl plik

@ -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');

Wyświetl plik

@ -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";
/*