summaryrefslogtreecommitdiff
path: root/includes/AjaxDispatcher.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
committerPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
commitba0fc4fa20067528effd4802e53ceeb959640825 (patch)
tree4f62217349d3afa39dbba3f7e19dac0aecb344f6 /includes/AjaxDispatcher.php
parentca32f08966f1b51fcb19460f0996bb0c4048e6fe (diff)
Update to MediaWiki 1.18.1
Diffstat (limited to 'includes/AjaxDispatcher.php')
-rw-r--r--includes/AjaxDispatcher.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php
index 17b154d6..5bc9f067 100644
--- a/includes/AjaxDispatcher.php
+++ b/includes/AjaxDispatcher.php
@@ -68,7 +68,7 @@ class AjaxDispatcher {
* request.
*/
function performAction() {
- global $wgAjaxExportList, $wgOut;
+ global $wgAjaxExportList, $wgOut, $wgUser;
if ( empty( $this->mode ) ) {
return;
@@ -84,6 +84,13 @@ class AjaxDispatcher {
'Bad Request',
"unknown function " . (string) $this->func_name
);
+ } elseif ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true )
+ && !$wgUser->isAllowed( 'read' ) )
+ {
+ wfHttpError(
+ 403,
+ 'Forbidden',
+ 'You must log in to view pages.' );
} else {
wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" );