Page MenuHomePhabricator

Add a user preference for access to IP Info
Closed, ResolvedPublic3 Estimated Story Points

Description

Access to the IPInfo tool is controlled by the 'ipinfo' right, which will be grated to certain trusted user groups, starting with checkusers.

Following T264150: User needs to request access to IP information [L], a user with the 'ipinfo' right must additionally check a box to indicate that they will use the tool only for anti-abuse purposes. This will be stored as a user preference. This task is to build out this preference.

In addition, the API endpoints should check for the presence of this user preference in addition to the 'ipinfo' right, and return a relevant error message if it is not present.

Event Timeline

Niharika triaged this task as Medium priority.Sep 30 2020, 5:27 AM
Niharika updated the task description. (Show Details)
Niharika renamed this task from Check for a user preference in addition to the 'ipinfo' right for the IPInfo tool to Add a user preference for access to IP Info .Oct 7 2020, 4:47 PM
Niharika updated the task description. (Show Details)
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".Oct 8 2020, 10:14 PM
ARamirez_WMF set Due Date to Oct 20 2020, 4:00 AM.
ARamirez_WMF removed Due Date which was set to Oct 20 2020, 4:00 AM.Oct 21 2020, 4:42 PM
ARamirez_WMF removed a subscriber: Tchanders.

@Prtksxna @Niharika I was thinking of starting with a checkbox on Special:Preferences, with a label something along the lines of: "See information about an IP address. A record will be made when you enable/disable this option."

If that's OK, which section of Special:Preferences should this option appear in?

Are we OK to defer details of the legal agreement about anti-vandalism until T264150?

Change 640236 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/IPInfo@master] Add a user preference for enabling the IP info tool

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

@Prtksxna @Niharika I was thinking of starting with a checkbox on Special:Preferences, with a label something along the lines of: "See information about an IP address. A record will be made when you enable/disable this option."

This text looks good 👍🏽

If that's OK, which section of Special:Preferences should this option appear in?

I am thinking that we can add a new section called Permissions at the bottom of the User profile tab.

This text looks good 👍🏽

Thanks, we'll go ahead with this then.

I am thinking that we can add a new section called Permissions at the bottom of the User profile tab.

Are you thinking a generic Permissions section for any permissions to go in? If so, then that should be added in core rather than in the IPInfo extension, since it doesn't make sense for that section only to be available if IPInfo is enabled. (We can do that just by adding a message in core - if the section is empty, the title won't appear.)

Do we know if this preference is going to stay in Special:Preferences, or move to an in-tool workflow? If the latter (or if we're not sure) we perhaps shouldn't make any changes to core for now. We could add it to an IP info section (defined in the extension) at the bottom of User profile until we know?

This text looks good 👍🏽

Thanks, we'll go ahead with this then.

I am thinking that we can add a new section called Permissions at the bottom of the User profile tab.

Are you thinking a generic Permissions section for any permissions to go in? If so, then that should be added in core rather than in the IPInfo extension, since it doesn't make sense for that section only to be available if IPInfo is enabled. (We can do that just by adding a message in core - if the section is empty, the title won't appear.)

Do we know if this preference is going to stay in Special:Preferences, or move to an in-tool workflow? If the latter (or if we're not sure) we perhaps shouldn't make any changes to core for now. We could add it to an IP info section (defined in the extension) at the bottom of User profile until we know?

I think it will have to be in both places. I guess the correct answer right now is "we're not sure". @Prtksxna please correct me if I'm wrong.

Do we know if this preference is going to stay in Special:Preferences, or move to an in-tool workflow?

I think it will have to be in both places. I guess the correct answer right now is "we're not sure".

Yeah, from our discussions I imagined that it'll be both too. We'll have a big obvious way to enable it from the tool itself (whether its a popup or a box on Special Contribs) but not a way to disable it. For disabling we'll point them to the right place in Special Prefs.

If the latter (or if we're not sure) we perhaps shouldn't make any changes to core for now. We could add it to an IP info section (defined in the extension) at the bottom of User profile until we know?

Yeah, I don't think this warrants making a change to core. So I'd go with your suggestion of adding an "IP information" section at the bottom of the User profile tab.

Yeah, I don't think this warrants making a change to core. So I'd go with your suggestion of adding an "IP information" section at the bottom of the User profile tab.

OK thanks - have done this.

Change 640236 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Add a user preference for enabling the IP info tool

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

dom_walden subscribed.

We now have a new preference at the bottom of the "User profile" tab of Special:Preferences.

preference.png (183×765 px, 14 KB)

When this is unchecked, the "i" icons do not appear on Special:Log or revision history.

The API endpoints return a 403 with error message You do not have permission to perform the action. This is the same response you get when you don't have the ipinfo right.

I tested the log, revision and IP endpoints.

It is also possible to set this preference globally.

Test environment: vagrant MediaWiki 1.36.0-alpha (a8f051f), CheckUser 2.5 (1309125).

We now have a new preference at the bottom of the "User profile" tab of Special:Preferences.

This setting only appears if the user has the ipinfo right.