*/
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 );
}
/**
* @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 );
}
/**