Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

GlobalBlock should extend AbstractBlock instead of DatabaseBlock
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

Extension:GlobalBlocking uses a separate database (or separate tables, depending on how configured) for storing GlobalBlocks, distinct from the ipblocks table used by MediaWiki core for storing DatabaseBlocks.

The GlobalBlock class currently extends DatabaseBlock, inheriting many methods with nonsensical applications (example: newFromID would load a block from ipblocks if one existed that happened to have the same ID, or otherwise return null).

Instead, it should extend AbstractBlock.

What needs doing
  • GlobalBlock should extend AbstractBlock
  • Implement any abstract methods on AbstractBlock that GlobalBlock previously inherited from DatabaseBlock. (They may need changing.)
  • Check whether any other methods should be re-implemented
Notes

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
ResolvedDreamy_Jazz
OpenSpikeNone
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
Resolved AGueyte
Resolved TThoabala
Resolved AGueyte
ResolvedWMDE-Fisch
Resolved AGueyte
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
OpenNone
ResolvedTchanders
ResolvedSTran

Event Timeline

Change 836777 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/GlobalBlocking@master] Update GlobalBlock to extend AbstractBlock

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

I've added my testing steps to: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GlobalBlocking/+/836777

I would test this on Beta, unless you have multiple wikis set up locally.

Let me know if steps to globally block someone or to use Special:Upload are required in more detail! (I'm assuming we don't want to repeat all those steps on every task...)

Change 836777 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Update GlobalBlock to extend AbstractBlock

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

@Tchanders Please review the results below that Dom and I tested when globally blocking the IP address.

Special Upload in Beta

T317190_GB_SpecialUpload.png (1×3 px, 367 KB)

Special Contributions/<ip address> in Beta

T317190_GB_SpecialContributions_Beta.png (630×3 px, 173 KB)

Edit Page in Beta

T317190_GB_Edit.png (784×1 px, 336 KB)

Special Contributions/<ip address> in Commons (foreign wiki)

T317190_GB_SpecialContributions_Commons.png (682×2 px, 150 KB)

We didn't get the different error when clicking on the link of the blocked user though

T317190_GB_BlockedUsers_Link.png (786×3 px, 279 KB)

No other extra steps besides what you see in the link for globally block someone or to use Special:Upload.

Thanks @GMikesell-WMF!

They looks good to me, in that the blocked errors are all present and seem to be consistent with each other.

Is it possible to check that these details are correct in all the error messages, for the block that you made?

  • Blocker's user name
  • Expiry date
  • Blocked IP
  • Reason
  • Time the block was made
  • Name of the wiki after the blocker's name

It might be that not all the messages have all the information, but as long as the information is correct that should be fine.

We didn't get the different error when clicking on the link of the blocked user though

This looks fine to me.

Thanks @GMikesell-WMF!

They looks good to me, in that the blocked errors are all present and seem to be consistent with each other.

Is it possible to check that these details are correct in all the error messages, for the block that you made?

  • Blocker's user name
  • Expiry date
  • Blocked IP
  • Reason
  • Time the block was made
  • Name of the wiki after the blocker's name

It might be that not all the messages have all the information, but as long as the information is correct that should be fine.

We didn't get the different error when clicking on the link of the blocked user though

This looks fine to me.

@Tchanders All information was consistent throughout as seen below. Please let us know if you need any other information or if anything else needs to be tested. Also validated when the expiry date has been completed, I was not blocked for anything after. Thanks!

GB Details
Blocker's user name- Georgemikesell
Expiry date- Expiry of block: 21:30, 12 October 2022
Blocked IP- 47.153.164.141
Reason- testing
Time the block was made: I made it at 1500 PST but it shows Start of block: 21:00, 12 October 2022 as seen in the screenshot
Name of the wiki after the blocker's name: Wikimedia Commons

T317190_GB_Details.png (1×2 px, 221 KB)

Beta
https://en.wikipedia.beta.wmflabs.org/wiki/Special:Contributions/47.153.164.141

T317190_GB_SpecialContributions_Commons_2.png (740×2 px, 138 KB)

https://en.wikipedia.beta.wmflabs.org/wiki/Special:Upload
T317190_GB_SpecialUpload_2.png (1×3 px, 367 KB)

https://en.wikipedia.beta.wmflabs.org/w/index.php?title=0.9002562730399448-%C3%B6%C3%A4%C3%BC-%E2%99%A0%E2%99%A3%E2%99%A5%E2%99%A6&action=edit
T317190_GB_Edit_2.png (899×3 px, 337 KB)

Wikimedia Commons
https://commons.wikimedia.beta.wmflabs.org/wiki/Special:Contributions/47.153.164.141

T317190_GB_SpecialContributions_Commons_2.png (740×2 px, 138 KB)