r35850 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35849‎ | r35850 | r35851 >
Date:07:02, 4 June 2008
Author:werdna
Status:old
Tags:
Comment:
Fix Tor exemption. user is a group, not a permission key.
Modified paths:
  • /trunk/extensions/TorBlock/TorBlock.i18n.php (modified) (history)
  • /trunk/extensions/TorBlock/TorBlock.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TorBlock/TorBlock.i18n.php
@@ -14,6 +14,7 @@
1515 'torblock-desc' => 'Allows tor exit nodes to be blocked from editing a wiki',
1616 'torblock-blocked' => 'Your IP address, <tt>$1</tt>, has been automatically identified as a tor exit node.
1717 Editing through tor is blocked to prevent abuse.'
 18+ 'right-torunblocked' => 'Bypass automatic blocks of tor exit nodes',
1819 );
1920
2021 /** German (Deutsch)
Index: trunk/extensions/TorBlock/TorBlock.php
@@ -36,8 +36,11 @@
3737 * Permission keys that bypass Tor blocks.
3838 * Array of permission keys.
3939 */
40 -$wgTorBypassPermissions = array( 'user', /*'autoconfirmed', 'proxyunbannable'*/ );
 40+$wgTorBypassPermissions = array( 'torunblocked', /*'autoconfirmed', 'proxyunbannable'*/ );
 41+$wgAvailableRights[] = 'torunblocked';
4142
 43+$wgGroupPermissions['user']['torunblocked'] = true;
 44+
4245 /**
4346 * Whether to load Tor blocks if they aren't stored in memcached.
4447 * Set to false on high-load sites, and use a cron job with the included

Status & tagging log