Made Special:RunJobs work for private wikis
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 24 Jul 2014 20:07:08 +0000 (13:07 -0700)
committerOri.livneh <ori@wikimedia.org>
Fri, 25 Jul 2014 20:02:27 +0000 (20:02 +0000)
Change-Id: Ieb7b20f606d276bdee284932e3205fd87d92fdeb

RELEASE-NOTES-1.24
includes/MediaWiki.php

index 2e9aaaf..cd24ef0 100644 (file)
@@ -160,6 +160,7 @@ production.
   for future updates. Because it's doing so heuristically, it may fail or drop
   wrong constraints.
 * (bug 67870) wfShellExec() cuts off stdout at multiples of 8192 bytes.
+* $wgRunJobsAsync now works with private wikis (e.g. read requires login).
 
 === Web API changes in 1.24 ===
 * action=parse API now supports prop=modules, which provides the list of
index 1c245c1..76530cb 100644 (file)
@@ -198,7 +198,9 @@ class MediaWiki {
                // Check user's permissions to read this page.
                // We have to check here to catch special pages etc.
                // We will check again in Article::view().
-               $permErrors = $title->getUserPermissionsErrors( 'read', $user );
+               $permErrors = $title->isSpecial( 'RunJobs' )
+                       ? array() // relies on HMAC key signature alone
+                       : $title->getUserPermissionsErrors( 'read', $user );
                if ( count( $permErrors ) ) {
                        // Bug 32276: allowing the skin to generate output with $wgTitle or
                        // $this->context->title set to the input title would allow anonymous users to