r18904 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r18903 | r18904 (on ViewVC) | r18905 >
Date:03:23, 7 January 2007
Author:werdna
Status:new
Tags:
Comment:* (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.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php	(revision 18903)
+++ trunk/phase3/includes/User.php	(revision 18904)
@@ -836,6 +836,11 @@
 		$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 );
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 18903)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 18904)
@@ -985,6 +985,7 @@
 $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: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 18903)
+++ trunk/phase3/RELEASE-NOTES	(revision 18904)
@@ -472,6 +472,8 @@
 * 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 ==
 

Follow-up revisions

RevisionCommit summaryAuthorDate
r18910Fix for r18904 where autoblocker would not correctly block ipblock-exempt users.werdna06:21, 7 January 2007
Views
Toolbox