* Add 'purge' privilege to replace the hardcoded check for login state in
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 04:25:25 +0000 (04:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 04:25:25 +0000 (04:25 +0000)
  determining whether action=purge can be done via GET. Switching the
  permission on for anons can be helpful for benchmarking.

RELEASE-NOTES
includes/Article.php
includes/DefaultSettings.php

index aa76224..c19ecc2 100644 (file)
@@ -59,6 +59,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 8613) Fix error when viewing "Recent Changes" and using Postgres.
 * Initialise site_stats table at upgrade time if data was missing
 * (bug 7250) Updated Unicode normalization tables to Unicode 5.0
+* Add 'purge' privilege to replace the hardcoded check for login state in
+  determining whether action=purge can be done via GET. Switching the
+  permission on for anons can be helpful for benchmarking.
 
 
 == Languages updated ==
index 6ca7dad..3a5ee31 100644 (file)
@@ -911,7 +911,7 @@ class Article {
        function purge() {
                global $wgUser, $wgRequest, $wgOut;
 
-               if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() ) {
+               if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) {
                        if( wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
                                $this->doPurge();
                        }
index 2ce7f98..1b52514 100644 (file)
@@ -964,6 +964,7 @@ $wgGroupPermissions['user' ]['upload']          = true;
 $wgGroupPermissions['user' ]['reupload']        = true;
 $wgGroupPermissions['user' ]['reupload-shared'] = true;
 $wgGroupPermissions['user' ]['minoredit']       = true;
+$wgGroupPermissions['user' ]['purge']           = true; // can use ?action=purge without clicking "ok"
 
 // Implicit group for accounts that pass $wgAutoConfirmAge
 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;