Page MenuHomePhabricator

Accessing Special:PrivateDomains as an anon incorrectly links to Special:EmailUser for the contact person link
Open, Needs TriagePublic

Description

Accessing Special:PrivateDomains as an anon incorrectly links to Special:EmailUser for the contact person link. This shouldn't link to this page since anons can't use it.

Perhaps we could make it for anons link to that person's userpage instead, and make it configurable via a MediaWiki message in case if contact details aren't available on there (e.g wikis could link it to Project:Contact or Project:Administrators if they wanted to).

Event Timeline

PrivateDomains has a customized version of SpecialPage::displayRestrictionError in the PrivateDomains class (SpecialPrivateDomains.php). It currently uses the i18n msg privatedomains-ifemailcontact which does indeed contain a link to Special:EmailUser; I suppose the correct way to go about this is to check for the user's login state in PrivateDomains::displayRestrictionError and display a different, yet-to-be-created msg for anons. Wanna submit a patch?