Groups which won't hit the rate limiter now configurable with $wgRateLimitsExcludedGroups
authorRob Church <robchurch@users.mediawiki.org>
Fri, 12 May 2006 17:47:53 +0000 (17:47 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Fri, 12 May 2006 17:47:53 +0000 (17:47 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/User.php

index 864a353..9252aec 100644 (file)
@@ -248,7 +248,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5915) Update to Indonesian localisation (id)
 * (bug 5913) Update for German localisation (de)
 * (bug 5905) Plural support for Bosnian localisation (bs)
-
+* Groups which won't hit the rate limiter now configurable with
+  $wgRateLimitsExcludedGroups
 
 == Compatibility ==
 
index 3637407..de6b76b 100644 (file)
@@ -1823,6 +1823,9 @@ $wgRateLimits = array(
                'ip'     => null,
                'subnet' => null,
                ),
+       'mailpassword' => array(
+               'ip' => NULL,
+               ),
        );
 
 /**
@@ -1830,6 +1833,11 @@ $wgRateLimits = array(
  */
 $wgRateLimitLog = null;
 
+/**
+ * Array of groups which should never trigger the rate limiter
+ */
+$wgRateLimitsExcludedGroups = array( 'sysop', 'bureaucrat' );
+
 /**
  * On Special:Unusedimages, consider images "used", if they are put
  * into a category. Default (false) is not to count those as used.
index cb6a6de..b109e80 100644 (file)
@@ -525,15 +525,17 @@ class User {
         * @public
         */
        function pingLimiter( $action='edit' ) {
-               global $wgRateLimits;
+               global $wgRateLimits, $wgRateLimitsExcludedGroups;
                if( !isset( $wgRateLimits[$action] ) ) {
                        return false;
                }
-               if( $this->isAllowed( 'delete' ) ) {
-                       // goddam cabal
-                       return false;
+               
+               # Some groups shouldn't trigger the ping limiter, ever
+               foreach( $this->getGroups() as $group ) {
+                       if( array_search( $group, $wgRateLimitsExcludedGroups ) !== false )
+                               return false;
                }
-
+               
                global $wgMemc, $wgDBname, $wgRateLimitLog;
                $fname = 'User::pingLimiter';
                wfProfileIn( $fname );