use getAuthUID function instead of get_uid, use new permission basis/cis and switch to Auth_Controller where possible

This commit is contained in:
Harald Bamberger
2024-11-04 15:41:02 +01:00
parent a65e94bc8a
commit 50880c696b
21 changed files with 84 additions and 76 deletions
+5 -10
View File
@@ -5,7 +5,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class CisVue extends FHC_Controller
class CisVue extends Auth_Controller
{
/**
@@ -13,14 +13,9 @@ class CisVue extends FHC_Controller
*/
public function __construct()
{
parent::__construct();
// Loads authentication library and starts authentication
$this->load->library('AuthLib');
$this->load->library('PermissionLib');
if (!isLogged())
show_404();
parent::__construct([
'Menu' => [self::PERM_LOGGED]
]);
}
//------------------------------------------------------------------------------------------------------------------
@@ -31,7 +26,7 @@ class CisVue extends FHC_Controller
public function Menu()
{
$this->load->model('content/Content_model', 'ContentModel');
$result = $this->ContentModel->getMenu(defined('CIS4_MENU_ENTRY') ? CIS4_MENU_ENTRY : null, get_uid());
$result = $this->ContentModel->getMenu(defined('CIS4_MENU_ENTRY') ? CIS4_MENU_ENTRY : null, getAuthUID());
$menu = getData($result) ?? (object)['childs' => []];
$this->outputJsonSuccess($menu);