X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialImport.php;h=f21c20651b39bf75d9402e01663279e515b640dc;hb=fd130247c28da68c351029124d8ddf1ad77db3f7;hp=c3aec83c18cde63771b4c4e056229e2f7686ce50;hpb=afb7212d218875c72ff21ef3e253fb265aab7b19;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index c3aec83c18..f21c20651b 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -24,6 +24,7 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; use MediaWiki\Permissions\PermissionManager; /** @@ -76,7 +77,10 @@ class SpecialImport extends SpecialPage { Hooks::run( 'ImportSources', [ &$this->importSources ] ); $user = $this->getUser(); - if ( !$user->isAllowedAny( 'import', 'importupload' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $user, 'import', 'importupload' ) + ) { throw new PermissionsError( 'import' ); }