Page MenuHomePhabricator

Pass the relevant and necessary context information to UserBlockedError
Closed, ResolvedPublic

Description

UserBlockedError passes the global request context to the block methods that format errors.

We can improve on this:

  • Only the user, language and IP are needed
  • These should be passed in by the caller where possible (i.e. Actions, EditPage, SpecialPages)

We should make these improvements after the block formatter service is introduced in T227174.

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 2 2019, 12:06 AM

Change 538452 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Allow user, language and IP to be passed to UserBlockedError

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

Change 538452 merged by jenkins-bot:
[mediawiki/core@master] Allow user, language and IP to be passed to UserBlockedError

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

dom_walden added a subscriber: dom_walden.

As part of T227007#5598774 I tested how block error messages look in most of the places in the code that we changed, including in different languages. Missing, I think, SpecialRevisionDelete and SpecialUserrights.

I have briefly tested SpecialRevisionDelete and SpecialUserrights on test as an admin with a database block on my user.

dbarratt closed this task as Resolved.Oct 23 2019, 3:15 PM