rename "secure" config setting to "securityLevel"
authorChristian Weiske <cweiske@cweiske.de>
Tue, 18 Sep 2012 05:41:31 +0000 (07:41 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 18 Sep 2012 05:41:31 +0000 (07:41 +0200)
data/config.default.php
www/www-security.php

index da1624156fe5a92540eee913f74588a475e5c277..0c9ec69fee54ec949922aa47d0c794bafb73f792 100644 (file)
@@ -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
index 9fae87bb1f0aeb86988f612dd680557022b3bfd9..e9fdab7207eb1340422f1ebc07f30c70c06f2e42 100644 (file)
@@ -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;
     }