X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/c630697fa2d4679eed006ae37aa594cbf7b99ae8..8aa0b9bda25f570e591e554bdbece99d5f6458c8:/www/www-security.php diff --git a/www/www-security.php b/www/www-security.php index 9fae87b..ccbdb97 100644 --- a/www/www-security.php +++ b/www/www-security.php @@ -4,12 +4,12 @@ namespace phorkie; * security levels + login requirement: */ -if (!isset($GLOBALS['phorkie']['auth']['secure'])) { +if (!isset($GLOBALS['phorkie']['auth']['securityLevel'])) { //not set? highest level of security - $GLOBALS['phorkie']['auth']['secure'] = 2; + $GLOBALS['phorkie']['auth']['securityLevel'] = 2; } -if ($GLOBALS['phorkie']['auth']['secure'] == 0) { +if ($GLOBALS['phorkie']['auth']['securityLevel'] == 0) { //everyone may do everything return; } @@ -17,8 +17,8 @@ if ($GLOBALS['phorkie']['auth']['secure'] == 0) { $logged_in = false; if (!isset($_SESSION['identity'])) { //not logged in -} else if ($GLOBALS['phorkie']['auth']['userlist']) { - if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['users'])) { +} else if ($GLOBALS['phorkie']['auth']['listedUsersOnly']) { + if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['auth']['users'])) { $logged_in = true; } } else { @@ -26,7 +26,7 @@ if (!isset($_SESSION['identity'])) { $logged_in = true; } -if ($secureAtLevel >= $GLOBALS['phorkie']['auth']['secure']) { +if ($secureAtLevel >= $GLOBALS['phorkie']['auth']['securityLevel']) { if ($logged_in) { return; }