r18904 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18903‎ | r18904 | r18905 >
Date:03:23, 7 January 2007
Author:werdna
Status:old
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:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -836,6 +836,11 @@
837837 $this->mBlockedby = 0;
838838 $ip = wfGetIP();
839839
 840+ if ($this->isAllowed( 'ipblock-exempt' ) ) {
 841+ # Exempt from all types of IP-block
 842+ $ip = null;
 843+ }
 844+
840845 # User/IP blocking
841846 $this->mBlock = new Block();
842847 $this->mBlock->fromMaster( !$bFromSlave );
Index: trunk/phase3/includes/DefaultSettings.php
@@ -985,6 +985,7 @@
986986 $wgGroupPermissions['sysop']['unwatchedpages'] = true;
987987 $wgGroupPermissions['sysop']['autoconfirmed'] = true;
988988 $wgGroupPermissions['sysop']['upload_by_url'] = true;
 989+$wgGroupPermissions['sysop']['ipblock-exempt'] = true;
989990
990991 // Permission to change users' group assignments
991992 $wgGroupPermissions['bureaucrat']['userrights'] = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -472,6 +472,8 @@
473473 * New maintenance script to show the cached statistics : showStats.php.
474474 * New special page to list available interwikis [[Special:Listinterwikis]]
475475 * Count deleted edits when regenerating total edits in maintenance/initStats.php
 476+* (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission
 477+ key has been added to enable this behaviour, by default assigned to sysops.
476478
477479 == Languages updated ==
478480

Follow-up revisions

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