Page MenuHomePhabricator

Make IP info viewable from Special:IPContributions
Closed, ResolvedPublic

Description

As of now, IP Info can be viewer via Special:Contributions (for IPs and Temporary accounts). Currently, when looking at a temporary account via Special:Contributions, one only sees info about the latest IP. When IPs get revealed, and you open Special:IPContributions to get more info, the IP info cannot be easily accessed.

One can make use of Special:IPInfo and view the data, but this is not really convenient. It would be useful if Special:IPContributions displayed the IP info as well, similar to what Special:Contributions does when viewing info about a legacy IP.

Event Timeline

Change #1102378 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/IPInfo@master] infobox: Show the IP infobox also for Special:IPContributions

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

Change #1102846 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/CheckUser@master] ipcontributions: Trigger a new SpecialIPContributionsBeforeMainOutput hook

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

Change #1102378 abandoned by Harroyo-wmf:

[mediawiki/extensions/IPInfo@master] infobox: Show the IP infobox also for Special:IPContributions

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

Change #1104713 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/IPInfo@master] infobox: Show the IP infobox also for Special:IPContributions

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

Change #1102846 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] ipcontributions: Refactor permission checks into checkPermissions

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

I'm reworking the implementation so we don't directly pass the IP to perform the lookup for as part of the backend request but with a revId that allows locating it in the DB. That way we don't need to change the signature of methods in the parent IPInfoHandler class.

Change #1106329 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/CheckUser@master] ipcontributions: Provide an oldid from cu_changes to be used for the IP lookup

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

Change #1106329 abandoned by Harroyo-wmf:

[mediawiki/extensions/CheckUser@master] ipcontributions: Do IP lookups against an oldid from cu_changes

Reason:

Not needed

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

After some discussion during the code review, we've decided to rely in a revisionId to get the IPInfo in Special:IPContributions (instead of passing the IP itself for the backend call). The downside is that we'll be showing an error if no edits have been made by a given IP or if the filters used in the page make the list of contirubtions shown empty, but that was already happening for other Contributions pages (there's already a different task to address that: https://phabricator.wikimedia.org/T380221). Therefore, changes in CheckUser are not needed anymore and have been closed.

The changes IPInfo https://gerrit.wikimedia.org/r/c/mediawiki/extensions/IPInfo/+/1104713 have been updated to use the revId for the IPContributions page.

Chnages updated and ready again for review: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/IPInfo/+/1104713.

IPContributions now relies in the backend controller used to query for a given revisionId instead of introducing a new one.

Change #1104713 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] infobox: Show the IP infobox also for Special:IPContributions

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

Djackson-ctr subscribed.

QA is completed... new code changes have been implemented (IP info is now viewable from Special:IPContributions).