Page MenuHomePhabricator

Globally autoblock the user's IP address when User::spreadAnyEditBlock is called
Closed, ResolvedPublic2 Estimated Story Points

Description

In T374857, a hook was added that allows extensions to spread any extension-specific blocks. This hook should be implemented by GlobalBlocking to autoblock the IP address used by the user if the user is blocked with a block that enables global autoblocks.

Acceptance criteria
  • When User::spreadAnyEditBlock is called, any relevant GlobalBlocking block is spread via an autoblock on the user's IP address

Related Objects

Event Timeline

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

[mediawiki/extensions/GlobalBlocking@master] [WIP] Spread global blocks on SpreadAnyEditBlock

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

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

[mediawiki/extensions/GlobalBlocking@master] Correct documentation of GlobalBlock::getId

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

Change #1079327 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Correct documentation of GlobalBlock::getId

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

Change #1078724 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Spread global blocks on SpreadAnyEditBlock

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

For QA I would suggest checking that the acceptance criteria have been met. To do this, you can try to edit while using an account that is globally blocked with autoblocking enabled. This should create a global blocking autoblock for the IP that you are using. If one already exists, then the expiry of the autoblock should be updated to be 1 day in the future.

To be able to complete this test you will need to set $wgGlobalBlockingEnableAutoblocks = true; in your LocalSettings.php. If you wish to test this in patch demo, I can make a patch which you can include in the creation of the wiki to be able to test on patch demo (just let me know).

Dreamy_Jazz set the point value for this task to 2.Oct 16 2024, 8:35 PM
Djackson-ctr subscribed.

QA has been completed, see screenshots below, thank you @Dreamy_Jazz for the QA notes:
Before Editing an account that is autoblocked:

image.png (329×1 px, 55 KB)

After Editing that same account that was autoblocked (expiration of the autoblocked IP has been updated to 1 day in the future):

image.png (340×1 px, 53 KB)