Deprecate and replace usages of User:isAllowed{All,Any}
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index 50bd63f..ac7e5cc 100644 (file)
@@ -250,7 +250,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;
                }