X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAutopromote.php;h=21567878868a0033194a713d604ec42f10df900e;hb=78fc6fe8659f1b7d67e7ca2e40640415a9d58ddc;hp=b17f1ab1c672e9362528cb40916ef87f91f016bc;hpb=c19e0a2ee969213c96a4153904ed4ff0cdec4e17;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Autopromote.php b/includes/Autopromote.php index b17f1ab1c6..2156787886 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -21,6 +21,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * This class checks if user can get extra rights * because of conditions specified in $wgAutopromote @@ -200,7 +202,9 @@ class Autopromote { case APCOND_BLOCKED: return $user->getBlock() && $user->getBlock()->isSitewide(); case APCOND_ISBOT: - return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) ); + return in_array( 'bot', MediaWikiServices::getInstance() + ->getPermissionManager() + ->getGroupPermissions( $user->getGroups() ) ); default: $result = null; Hooks::run( 'AutopromoteCondition', [ $cond[0],