Followup r84825
authorSam Reed <reedy@users.mediawiki.org>
Fri, 1 Apr 2011 17:29:15 +0000 (17:29 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 1 Apr 2011 17:29:15 +0000 (17:29 +0000)
Allow obtaining of an import token if users have the importupload right

includes/api/ApiQueryInfo.php

index 5b0d325..8a6e570 100644 (file)
@@ -204,7 +204,7 @@ class ApiQueryInfo extends ApiQueryBase {
 
        public static function getImportToken( $pageid, $title ) {
                global $wgUser;
-               if ( !$wgUser->isAllowed( 'import' ) ) {
+               if ( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) {
                        return false;
                }