Page MenuHomePhabricator

Use a global preference for accepting the IP reveal agreement
Open, Needs TriagePublic2 Estimated Story Points

Description

Background

Users who have the right to reveal IPs of temporary users globally (or on multiple wikis) don't want to check a preference on each new wiki they visit for patrolling work.

We need a global preference that works like the local preference implemented in T326736: Create preference for viewing IP addresses used by temporary accounts.

Details

It would be nice to replace the local preference with a global preference, rather than introducing a global preference in addition to the local preference. Anyone accepting the preference would be accepting the agreement for all our wikis.

Advantages of this:

  • For users with the right to reveal IP on more than one wiki, they only need to accept the preference once
  • For users who only have the right to reveal IP on one wiki, once they have accepted the global agreement, they do not need to sign it again if they gain the right on another wiki
  • We will not need to determine what should happen if the global and local preferences don't match. The existence of a global and local preference led to complexity during the IPInfo project: T298977

Event Timeline

Dreamy_Jazz set the point value for this task to 23.
Dreamy_Jazz changed the point value for this task from 23 to 2.

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

[mediawiki/extensions/GlobalPreferences@master] [WIP] Handle 'info' preferences in Special:GlobalPreferences

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

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

[mediawiki/extensions/CheckUser@master] [WIP] Make IP reveal preference description appear in GlobalPreferences

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

We will not need to determine what should happen if the global and local preferences don't match.

AFAIK based on my testing, MediaWiki-extensions-GlobalPreferences will handle this for us. The issue with IP Info seemed to be that a checkbox to agree to the tool use was not on Special:Preferences. As no such equivalent exists for temporary account IP reveal, we can rely on MediaWiki-extensions-GlobalPreferences handling the difference for us.


It also seems that the MediaWiki-extensions-GlobalPreferences support is enabled out of the box, but that the description text is not shown on Special:GlobalPreferences. I've made some patches that should address this by forcing this text to appear on Special:GlobalPreferences.

This is what the preference looks like in Special:GlobalPreferences with the patches applied here:

image.png (242×924 px, 34 KB)

This again, but in a wider context:

image.png (1×981 px, 96 KB)

Suggested testing steps for when this is QA'd for local wiki:

  1. Install CheckUser and MediaWiki-extensions-GlobalPreferences
  2. Log into an account with the checkuser-temporary-account group. This is not checkuser as that has the -no-preference right, which will not be possible to use to test this. You can give the necessary right to the sysop group by adding the following to LocalSettings.php:
$wgGroupPermissions['sysop']['checkuser-temporary-account'] = true;
  1. Open Special:GlobalPreferences and verify that the preference to reveal temporary account IPs is displayed there along with the description for the preference.
  2. Open Special:Preferences and verify that the preference to reveal temporary account IPs is displayed there
  3. Using a variety of combinations of the preference being checked in Special:Preferences / Special:GlobalPreferences, test that when the preference is checked in either pages that the "Show IP" button is shown next to temporary account usernames. If the preference is unchecked in both forms, then the "Show IP" button should not be checked.