From: Christian Weiske Date: Tue, 18 Sep 2012 05:41:31 +0000 (+0200) Subject: rename "secure" config setting to "securityLevel" X-Git-Tag: v0.3.0~42^2~15 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/3367fca1c9cdeb70c95154f20011b268d4d080a4 rename "secure" config setting to "securityLevel" --- diff --git a/data/config.default.php b/data/config.default.php index da16241..0c9ec69 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -13,7 +13,7 @@ $GLOBALS['phorkie']['cfg'] = array( 'index' => 'new'//"new" or "list" ); $GLOBALS['phorkie']['auth'] = array( - 'secure' => 0, // 0 = public, no authentication, 1 = protect adds/edits/deletes, 2 = use authentication + 'securityLevel' => 0, // 0 = public, no authentication, 1 = protect adds/edits/deletes, 2 = require authentication 'userlist' => false, // true = user must be explicitly defined, false = anyone allowed, but they must authenticate 'anonymousName' => 'Anonymous', // Email for non-authenticated commits 'anonymousEmail' => 'anonymous@phorkie' // Email for non-authenticated commits diff --git a/www/www-security.php b/www/www-security.php index 9fae87b..e9fdab7 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; } @@ -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; }