X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fspecialpage%2FSpecialPage.php;h=ba8e318bcd293514aab391050834c79210b27f8c;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hp=d7e39d5129aeb61e0b7ef33f796f39f38376ac04;hpb=6b9b8b9addab07f58bb024735c69722c7db88669;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index d7e39d5129..ba8e318bcd 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -278,7 +278,9 @@ class SpecialPage implements MessageLocalizer { */ public function isRestricted() { // DWIM: If anons can do something, then it is not restricted - return $this->mRestriction != '' && !User::groupHasPermission( '*', $this->mRestriction ); + return $this->mRestriction != '' && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->groupHasPermission( '*', $this->mRestriction ); } /** @@ -290,7 +292,9 @@ class SpecialPage implements MessageLocalizer { * @return bool Does the user have permission to view the page? */ public function userCanExecute( User $user ) { - return $user->isAllowed( $this->mRestriction ); + return MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $user, $this->mRestriction ); } /**