* (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission...
authorAndrew Garrett <werdna@users.mediawiki.org>
Sun, 7 Jan 2007 03:23:31 +0000 (03:23 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Sun, 7 Jan 2007 03:23:31 +0000 (03:23 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/User.php

index 322c387..f4430a3 100644 (file)
@@ -472,6 +472,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * New maintenance script to show the cached statistics : showStats.php.
 * New special page to list available interwikis [[Special:Listinterwikis]]
 * Count deleted edits when regenerating total edits in maintenance/initStats.php
+* (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission
+  key has been added to enable this behaviour, by default assigned to sysops.
 
 == Languages updated ==
 
index 88e440d..00a375b 100644 (file)
@@ -985,6 +985,7 @@ $wgGroupPermissions['sysop']['reupload-shared'] = true;
 $wgGroupPermissions['sysop']['unwatchedpages']  = true;
 $wgGroupPermissions['sysop']['autoconfirmed']   = true;
 $wgGroupPermissions['sysop']['upload_by_url']   = true;
+$wgGroupPermissions['sysop']['ipblock-exempt'] = true;
 
 // Permission to change users' group assignments
 $wgGroupPermissions['bureaucrat']['userrights'] = true;
index c66c2d7..9bbe1af 100644 (file)
@@ -836,6 +836,11 @@ class User {
                $this->mBlockedby = 0;
                $ip = wfGetIP();
 
+               if ($this->isAllowed( 'ipblock-exempt' ) ) {
+                       # Exempt from all types of IP-block
+                       $ip = null;
+               }
+
                # User/IP blocking
                $this->mBlock = new Block();
                $this->mBlock->fromMaster( !$bFromSlave );