Skin: Restore use of Authority in place of PermissionManager
This was done originally in Ie530051, but it seems was partially reverted when I177cd83 was merged. Change-Id: Ib699f3519a12b442adcd31938a1394918f3a74f7
This commit is contained in:
parent
7f907d657d
commit
1c8cda3e87
1 changed files with 1 additions and 2 deletions
|
|
@ -450,14 +450,13 @@ abstract class Skin extends ContextSource {
|
|||
}
|
||||
}
|
||||
|
||||
$pm = MediaWikiServices::getInstance()->getPermissionManager();
|
||||
// The relevant user should only be set if it exists. However, if it exists but is hidden,
|
||||
// and the viewer cannot see hidden users, this exposes the fact that the user exists;
|
||||
// pretend like the user does not exist in such cases, by setting it to null. T120883
|
||||
if ( $this->mRelevantUser
|
||||
&& $this->mRelevantUser->isRegistered()
|
||||
&& $this->mRelevantUser->isHidden()
|
||||
&& !$pm->userHasRight( $this->getUser(), 'hideuser' )
|
||||
&& !$this->getAuthority()->isAllowed( 'hideuser' )
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue