jenkins-bot has submitted this change and it was merged. Change subject: Respect editmyprivateinfo for email ......................................................................
Respect editmyprivateinfo for email Had set this so that users on a corporate wiki couldn't modify their email, but saw that Echo wasn't respecting it. Bug: T135152 Change-Id: I1c7840e4f0648ab20ccc89ae281eb86cddad516c (cherry picked from commit 50611ad682124a98602d9ba121922cc5d2f1705f) --- M Hooks.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 33a4470..b3f6e77 100644 --- a/Hooks.php +++ b/Hooks.php @@ -285,8 +285,9 @@ array(), array( 'returnto' => $prefsTitle->getFullText() ) ); - $emailAddress = $user->getEmail() ? htmlspecialchars( $user->getEmail() ) : ''; - if ( $wgAuth->allowPropChange( 'emailaddress' ) ) { + $emailAddress = $user->getEmail() && $user->isAllowed( 'viewmyprivateinfo' ) + ? htmlspecialchars( $user->getEmail() ) : ''; + if ( $user->isAllowed( 'editmyprivateinfo' ) && $wgAuth->allowPropChange( 'emailaddress' ) ) { if ( $emailAddress === '' ) { $emailAddress .= $link; } else { -- To view, visit https://gerrit.wikimedia.org/r/296526 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c7840e4f0648ab20ccc89ae281eb86cddad516c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: REL1_27 Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> Gerrit-Reviewer: Gergő Tisza <gti...@wikimedia.org> Gerrit-Reviewer: MarkAHershberger <m...@nichework.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits