From: Brion Vibber Date: Sat, 13 Jan 2007 04:25:25 +0000 (+0000) Subject: * Add 'purge' privilege to replace the hardcoded check for login state in X-Git-Tag: 1.31.0-rc.0~54433 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=6f93347ccd7e52f7f7a80858d55a886712ba622a;p=lhc%2Fweb%2Fwiklou.git * 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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index aa76224a03..c19ecc216d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Article.php b/includes/Article.php index 6ca7dad239..3a5ee31b18 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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(); } diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 2ce7f98a76..1b525149ff 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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;