Followup T230402, PermissionManager doesn't exist until 1.33, so fix the
backported patches to use User::isAllowed() instead.
Change-Id: Ia73bf71293d67f97fb5086ffc0384307568d4d43
THIS IS NOT A RELEASE YET
=== Changes since MediaWiki 1.31.4 ===
+* Followup T230402, PermissionManager doesn't exist until 1.33, so fix the
+ backported patches to use User::isAllowed() instead.
== MediaWiki 1.31.4 ==
// Message: redirect-not-exists
return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
}
- if ( $user->isHidden() && !MediaWikiServices::getInstance()->getPermissionManager()
- ->userHasRight( $this->getUser(), 'hideuser' )
- ) {
+ if ( $user->isHidden() && !$this->getUser()->isAllowed( 'hideuser' ) ) {
throw new PermissionsError( null, [ 'badaccess-group0' ] );
}
$userpage = Title::makeTitle( NS_USER, $username );