r51410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51409‎ | r51410 | r51411 >
Date:15:32, 3 June 2009
Author:werdna
Status:ok
Tags:
Comment:
(bug 18343) Add a right to exempt users from global blocks, but not local ones
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.class.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/GlobalBlocking.php
@@ -64,6 +64,7 @@
6565 $wgAvailableRights[] = 'globalblock';
6666 $wgAvailableRights[] = 'globalunblock';
6767 $wgAvailableRights[] = 'globalblock-whitelist';
 68+$wgAvailableRights[] = 'globalblock-exempt';
6869
6970 ## CONFIGURATION
7071 /**
Index: trunk/extensions/GlobalBlocking/GlobalBlocking.class.php
@@ -54,7 +54,8 @@
5555 return $result = array();
5656 }
5757
58 - if ( $user->isAllowed( 'ipblock-exempt' ) ) {
 58+ if ( $user->isAllowed( 'ipblock-exempt' ) ||
 59+ $user->isAllowed( 'globalblock-exempt' ) ) {
5960 // User is exempt from IP blocks.
6061 return $result = array();
6162 }
Index: trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php
@@ -118,6 +118,7 @@
119119 'right-globalblock' => 'Make global blocks',
120120 'right-globalunblock' => 'Remove global blocks',
121121 'right-globalblock-whitelist' => 'Disable global blocks locally',
 122+ 'right-globalblock-exempt' => 'Bypass global blocks',
122123 );
123124
124125 /** Message documentation (Message documentation)

Status & tagging log