Page MenuHomePhabricator

Block messages are inconsistent if a user is blocked from email
Closed, ResolvedPublic1 Story Points

Description

On Special:EmailUser, if a user is partially blocked and blocked from email, they see a custom block error message:

If a user is sitewide blocked and blocked from email, they see the error message with the key 'blockedtext'. This is not customized for email and is not designed to work with different types of block (e.g. system block, composite block, autoblock), resulting in problems like those discussed in T227174#5575175. For example:

The problem is that SpecialEmailUser selects its block message key directly, whereas other places throw a UserBlockedError, which gets the message via the BlockErrorFormatter, which selects the appropriate message depending on the block.

Solution

We could simply throw a UserBlockedError from Special:EmailUser. This would immediately improve the block messages for all types of sitewide blocks. For partial blocks, we would need to solve T233206 first, to avoid a confusing message.

Details

Related Gerrit Patches:

Event Timeline

Tchanders created this task.Jul 1 2019, 1:14 PM
Restricted Application added subscribers: MGChecker, Aklapper. · View Herald TranscriptJul 1 2019, 1:14 PM

This seems to be about MediaWiki-Email, hence adding corresponding project code base tag.

Tchanders renamed this task from Block messages are inconsistent if a user is partially blocked and blocked from email to Block messages are inconsistent if a user is blocked from email.Oct 15 2019, 4:22 PM
Tchanders updated the task description. (Show Details)

Change 543847 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Throw a UserBlockedError from Special:Emailuser if a user is blocked

https://gerrit.wikimedia.org/r/543847

Niharika triaged this task as Medium priority.Oct 17 2019, 6:40 PM
Niharika set the point value for this task to 1.

Change 543847 merged by jenkins-bot:
[mediawiki/core@master] Throw a UserBlockedError from Special:Emailuser if a user is blocked

https://gerrit.wikimedia.org/r/543847

dom_walden added a subscriber: dom_walden.

Block error message for Special:EmailUser now looks ok for composite blocks, including in non-default language (French).

We don't distinguish between partial and sitewide blocks anymore.

I also retested IP, Username and cookie (auto) blocks.

There do not seem to be any system blocks which block emailing (including extensions), apart from TorBlock with $wgGroupPermissions['user']['torunblocked'] = false;)

Testing on https://en.wikipedia.beta.wmflabs.org 1.35.0-alpha (2096315) 09:39, 25 October 2019).

dbarratt closed this task as Resolved.Oct 28 2019, 5:48 PM