ACL Login add page information and lookup

Add the full page information and a new file name to cuid lookup to the acl array.
Add a new method to check if a page name is in the list of pages that can be accessed by the user.
This commit is contained in:
Clemens Schwaighofer
2025-04-15 18:38:14 +09:00
parent b18866077e
commit 8396f7856b
3 changed files with 41 additions and 1 deletions

View File

@@ -127,6 +127,12 @@ if (isset($login->loginGetAcl()['unit'])) {
// IP check: 'REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR', 'CLIENT_IP' in _SERVER
// Agent check: 'HTTP_USER_AGENT'
print "<hr>";
print "PAGE lookup:<br>";
$file_name = 'test_edit_base.php';
print "Access to '$file_name': " . $log->prAr($login->loginPageAccessAllowed($file_name)) . "<br>";
$file_name = 'i_do_not_exists.php';
print "Access to '$file_name': " . $log->prAr($login->loginPageAccessAllowed($file_name)) . "<br>";
echo "<hr>";
print "SESSION: " . Support::printAr($_SESSION) . "<br>";