ParamValidator: Flag as unstable for 1.34
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index 50bd63f..98474c7 100644 (file)
@@ -118,6 +118,7 @@ class ApiQueryInfo extends ApiQueryBase {
                return $this->tokenFunctions;
        }
 
+       /** @var string[] */
        protected static $cachedTokens = [];
 
        /**
@@ -250,7 +251,9 @@ class ApiQueryInfo extends ApiQueryBase {
         */
        public static function getImportToken( $pageid, $title ) {
                global $wgUser;
-               if ( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) {
+               if ( !MediaWikiServices::getInstance()
+                       ->getPermissionManager()
+                       ->userHasAnyRight( $wgUser, 'import', 'importupload' ) ) {
                        return false;
                }