From: Brion Vibber Date: Thu, 16 Jun 2005 06:53:26 +0000 (+0000) Subject: * (bug 873) Fix usage of createaccount permission; replaces $wgWhitelistAccount X-Git-Tag: 1.5.0beta1~182 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=0199bdd2a985d6ae729e6f6ef24f72cff0b855b5;p=lhc%2Fweb%2Fwiklou.git * (bug 873) Fix usage of createaccount permission; replaces $wgWhitelistAccount --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f93fbbfa33..794ca59a9b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 462c89b51a..07767beb62 100644 --- 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 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 017672b809..79f91fbca4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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' diff --git a/includes/User.php b/includes/User.php index da3f9373a2..e3287abb22 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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' ); } /**