* (bug 873) Fix usage of createaccount permission; replaces $wgWhitelistAccount
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 16 Jun 2005 06:53:26 +0000 (06:53 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 16 Jun 2005 06:53:26 +0000 (06:53 +0000)
RELEASE-NOTES
UPGRADE
includes/DefaultSettings.php
includes/User.php

index f93fbbf..794ca59 100644 (file)
@@ -293,6 +293,7 @@ Various bugfixes, small features, and a few experimental things:
   when searching for a specific group and can't be split across pages
 * (bug 1702) Display a handy upload link instead of a useless blank link
   for [[media:]] links to nonexistent files.
+* (bug 873) Fix usage of createaccount permission; replaces $wgWhitelistAccount
 
 === Caveats ===
 
diff --git a/UPGRADE b/UPGRADE
index 462c89b..07767be 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -38,6 +38,21 @@ Message changes:
   wikitext, and will need to be manually fixed if customized.
 
 
+=== Configuration changes from 1.4.x: ===
+
+$wgDisableUploads has been replaced with $wgEnableUploads.
+
+$wgWhitelistAccount has been replaced by the 'createaccount' permission
+key in $wgGroupPermissions. To emulate the old effect of setting:
+  $wgWhitelistAccount['user'] = 0;
+set:
+  $wgGroupPermissions['*'] = array( 'read' ); // without createaccount
+
+If $wgWhitelistRead is set, things need to be funked around. This needs work.
+
+bla bla bla
+
+
 === Web installer ===
 
 You can use the web-based installer wizard if you first remove the
index 017672b..79f91fb 100644 (file)
@@ -656,7 +656,6 @@ $wgHitcounterUpdateFreq = 1;
 
 $wgWhitelistEdit = false;   # true = user must login to edit.
 $wgWhitelistRead = false;      # Pages anonymous user may see, like: = array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
-$wgWhitelistAccount = array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 );
 
 $wgAllowAnonymousMinor = false; # Allow anonymous users to mark changes as 'minor'
 
index da3f937..e3287ab 100644 (file)
@@ -1309,15 +1309,7 @@ class User {
        }
 
        function isAllowedToCreateAccount() {
-               global $wgWhitelistAccount;
-               $allowed = false;
-
-               if (!$wgWhitelistAccount) { return 1; }; // default behaviour
-               foreach ($wgWhitelistAccount as $right => $ok) {
-                       $userHasRight = (!strcmp($right, 'user') || in_array($right, $this->getRights()));
-                       $allowed |= ($ok && $userHasRight);
-               }
-               return $allowed;
+               return $this->isAllowed( 'createaccount' );
        }
 
        /**