From: Andrew Garrett Date: Sun, 7 Jan 2007 03:23:31 +0000 (+0000) Subject: * (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission... X-Git-Tag: 1.31.0-rc.0~54621 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=9b91d163a2c8b2c9cbf9dacc69fe2e76394da3b9;p=lhc%2Fweb%2Fwiklou.git * (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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 322c387fc1..f4430a31bb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 88e440dea8..00a375b88f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/User.php b/includes/User.php index c66c2d77bc..9bbe1afadb 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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 );