diff --git a/www/admin/class_test.php b/www/admin/class_test.php
index 695ad5d6..cfd84749 100644
--- a/www/admin/class_test.php
+++ b/www/admin/class_test.php
@@ -96,13 +96,13 @@ print "
READ _ENV ARRAY:
";
print CoreLibs\Debug\Support::printAr(array_map('htmlentities', $_ENV));
// set + check edit access id
$edit_access_id = 3;
-if (is_object($login) && isset($login->acl['unit'])) {
- print "ACL UNIT: " . print_r(array_keys($login->acl['unit']), true) . "
";
+if (is_object($login) && isset($login->loginGetAcl()['unit'])) {
+ print "ACL UNIT: " . print_r(array_keys($login->loginGetAcl()['unit']), true) . "
";
print "ACCESS CHECK: " . (string)$login->loginCheckEditAccess($edit_access_id) . "
";
if ($login->loginCheckEditAccess($edit_access_id)) {
$backend->edit_access_id = $edit_access_id;
} else {
- $backend->edit_access_id = $login->acl['unit_id'];
+ $backend->edit_access_id = $login->loginGetAcl()['unit_id'];
}
} else {
print "Something went wrong with the login
";
@@ -133,8 +133,8 @@ $log->debug('SOME MARK', 'Some error output');
// INTERNAL SET
print "EDIT ACCESS ID: " . $backend->edit_access_id . "
";
if (is_object($login)) {
- // print "ACL:
".$backend->print_ar($login->acl)."
";
- $log->debug('ACL', "ACL: " . \CoreLibs\Debug\Support::printAr($login->acl));
+ // print "ACL:
".$backend->print_ar($login->loginGetAcl())."
";
+ $log->debug('ACL', "ACL: " . \CoreLibs\Debug\Support::printAr($login->loginGetAcl()));
// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
";
// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
";
// $result = array_flip(
@@ -149,7 +149,7 @@ if (is_object($login)) {
// );
// print "DEFAULT ACL:
".$backend->print_ar($result)."
";
// DEPRICATED CALL
- // $backend->adbSetACL($login->acl);
+ // $backend->adbSetACL($login->loginGetAcl());
}
print "THIS HOST: " . HOST_NAME . ", with PROTOCOL: " . HOST_PROTOCOL . " is running SSL: " . HOST_SSL . "
";
diff --git a/www/includes/admin_header.php b/www/includes/admin_header.php
index 2a56280e..4ee6a15c 100644
--- a/www/includes/admin_header.php
+++ b/www/includes/admin_header.php
@@ -92,7 +92,7 @@ $cms->menu_show_flag = 'main';
// db info
$cms->db->dbInfo();
// set acl
-$cms->setACL($login->acl);
+$cms->setACL($login->loginGetAcl());
// flush (can we move that to header block above)
ob_end_flush();
//------------------------------ class init end
diff --git a/www/lib/CoreLibs/ACL/Login.php b/www/lib/CoreLibs/ACL/Login.php
index aaed6143..c6d41086 100644
--- a/www/lib/CoreLibs/ACL/Login.php
+++ b/www/lib/CoreLibs/ACL/Login.php
@@ -153,7 +153,7 @@ class Login
private $acl = [];
/** @var array */
private $default_acl_list = [];
- /** @var array Reverse list to lookup level from type */
+ /** @var array Reverse list to lookup level from type */
private $default_acl_list_type = [];
/** @var int default ACL level to be based on if nothing set */
private $default_acl_level = 0;
@@ -815,9 +815,9 @@ class Login
// set the default edit access
$this->acl['default_edit_access'] = $_SESSION['UNIT_DEFAULT'] ?? null;
// integrate the type acl list, but only for the keyword -> level
- $this->acl['min'] = $this->default_acl_list_type ?? [];
+ $this->acl['min'] = $this->default_acl_list_type;
// set the full acl list too (lookup level number and get level data)
- $this->acl['acl_list'] = $this->default_acl_list ?? [];
+ $this->acl['acl_list'] = $this->default_acl_list;
// debug
// $this->debug('ACL', $this->print_ar($this->acl));
}
@@ -1794,10 +1794,7 @@ EOM;
return $this->default_acl_list;
}
// if level given and exist return this array block (name/level)
- if (
- !empty($level) &&
- !empty($this->default_acl_list[$level])
- ) {
+ if (!empty($this->default_acl_list[$level])) {
return $this->default_acl_list[$level];
} else {
// else return empty array