Page MenuHomePhabricator

Update GlobalBlockingHooks to support global account blocks
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
Dreamy_Jazz
May 31 2024, 6:03 PM
Referenced Files
F55416651: image.png
Thu, Jun 20, 5:43 AM
F55416494: image.png
Thu, Jun 20, 5:43 AM
F55416548: image.png
Thu, Jun 20, 5:43 AM
F55416370: image.png
Thu, Jun 20, 5:43 AM
F55416470: image.png
Thu, Jun 20, 5:43 AM
F55416171: image.png
Thu, Jun 20, 5:43 AM
F55416128: image.png
Thu, Jun 20, 5:43 AM
F55416075: image.png
Thu, Jun 20, 5:43 AM

Description

The GlobalBlockingHooks file needs to be updated to support global blocks on accounts, including the special contributions handler.

Related Objects

StatusSubtypeAssignedTask
OpenNone
StalledNone
In ProgressNiharika
OpenNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenFeatureDreamy_Jazz
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedMarostegui
ResolvedMarostegui
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz

Event Timeline

Change #1037838 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/GlobalBlocking@master] Display global account blocks on Special:Contributions

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

Change #1039803 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/GlobalBlocking@master] [WIP] Test GlobalBlockingHooks

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

Change #1037838 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Display global account blocks on Special:Contributions

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

Change #1040191 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/GlobalBlocking@master] [WIP] Update GlobalBlockingHooks for global account blocks

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

Change #1039803 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Test GlobalBlockingHooks

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

Change #1040191 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Update GlobalBlockingHooks for global account blocks

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

Testing notes

This updates a few features.

Setup:

  • Set wgGlobalBlockingAllowGlobalAccountBlocks to true
  • Globally block an IP address (regression testing)
  • Globally block a user (new functionality)

Adding a block link to Special:Block and Special:BlockList:

  • On Special:Block/<globallyBlockedIp> a message should appear at the top of the page saying the user is globally blocked, with a link to details
  • Same for Special:Block/<globallyBlockedUser>, unless the blocked user is hidden and the performing user can't see hidden users
  • Same for Special:BlockList/<globallyBockedIpOrUser>
  • These should be shown even if the global block is locally disabled

Adding a notice on Special:Contributions:

  • On Special:Contributions/<globallyBlockedIp> a notice should appear at the top of the page saying the user is globally blocked
  • Same for Special:Contributions/<globallyBlockedUser>
  • These should not be shown if the global block is locally disabled

Adding links to Special:Contributions

  • On Special:Contributions/<globallyBlockedIp> the pipe-separated list of links at the top of the page should contain links for "modify the global block" and "remove the global block", which link to a form with the IP pre-filled
  • On Special:Contributions/<notGloballyBlockedIp> there should instead be a link for "global block", which links to a form with the IP pre-filled
  • Same for registered users
  • If the accessing user doesn't have the globalblock right, they shouldn't see any of these links

With wgGlobalBlockingAllowGlobalAccountBlocks false, all this should behave the same as before this task.

I have verified the new code has been implemented and is functioning and displaying as expected...
Good Work @Dreamy_Jazz, and a big thank you to @Tchanders for the excellent Testing Notes which are greatly appreciated.


Screenshots for Adding a block link to Special:Block and Special:BlockList:

image.png (681×883 px, 42 KB)

image.png (767×1 px, 65 KB)

image.png (415×1 px, 38 KB)

image.png (412×1 px, 43 KB)


Screenshots for Adding a notice on Special:Contributions & Adding links to Special:Contributions:

image.png (348×884 px, 30 KB)

image.png (315×1 px, 38 KB)

image.png (289×905 px, 24 KB)

image.png (222×879 px, 18 KB)

image.png (937×922 px, 89 KB)

image.png (992×1 px, 113 KB)

image.png (349×889 px, 18 KB)

image.png (110×871 px, 12 KB)

image.png (233×916 px, 20 KB)

image.png (532×1 px, 44 KB)

image.png (588×1 px, 45 KB)

image.png (265×1 px, 30 KB)