X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=ea10a2e8638e59bdfb4277efbbc29dfda422018d;hb=7c2ad4cc239e21022ed3dc302d06eebe24916348;hp=f6c907513681de41803f365310fc46498facb83a;hpb=1658759d42a5d802e29a71c3fd70ae127afd3e46;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index f6c9075136..ea10a2e863 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -114,6 +114,7 @@ class AjaxDispatcher { return; } + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); if ( !in_array( $this->func_name, $this->config->get( 'AjaxExportList' ) ) ) { wfDebug( __METHOD__ . ' Bad Request for unknown function ' . $this->func_name . "\n" ); wfHttpError( @@ -121,7 +122,8 @@ class AjaxDispatcher { 'Bad Request', "unknown function " . $this->func_name ); - } elseif ( !User::isEveryoneAllowed( 'read' ) && !$user->isAllowed( 'read' ) ) { + } elseif ( !$permissionManager->isEveryoneAllowed( 'read' ) && + !$permissionManager->userHasRight( $user, 'read' ) ) { wfHttpError( 403, 'Forbidden',