Page MenuHomePhabricator

IP reveal guidance dialog: Do not show IPInfo checkbox if user does not have appropriate IPInfo rights
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

What is the problem?

Currently, on the second page of the IP reveal guidance dialog you are shown the "Enable IP Information" checkbox to allow the preference, even if you don't have the rights to IPInfo. Trying to save the preference via the dialog will have no effect.

API response is:

{
    "warnings": {
        "options": {
            "warnings": "Validation error for \"ipinfo-use-agreement\": not a valid preference."
        }
    },
    "options": "success"
}
Steps to reproduce problem
  1. On an environment with CheckUser and IP Info installed and $wgCheckUserEnableTempAccountsOnboardingDialog = true;
  2. Login as a user with checkuser-temporary-account-viewer but not any of the IPInfo rights
  3. Go to Special:RecentChanges, Special:Watchlist or the revision history for a page
  4. A dialog should appear, click the next button to see the IPInfo preference checkbox
Environment

Wiki(s): local docker CheckUser 2.5 (ef2879f) 07:44, 28 February 2025.

Event Timeline

The idea was to only show the dialog once we have made IP Info permissions equal to IP reveal, as part of T375086: Bring IP Info access permissions to parity with the IP Reveal feature. Therefore, the idea is that a user would always have both rights when seeing the dialog. However, that won't necessarily be the case for third-party wikis and I wonder if we should hide the step entirely if the user does not have IP Info access?

Actually, looking again at the content of the step, it does not appear to imply the user has the ability to use the tool. The only part of the step that does this is the preference. Therefore, I think we can fix this by removing the preference if the user cannot set it per the task description.

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

[mediawiki/extensions/CheckUser@master] IP reveal onboarding: Hide IPInfo preference if user lacks right

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

Change #1123632 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP reveal onboarding: Hide IPInfo preference if user lacks right

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

Djackson-ctr subscribed.

QA is completed, I have verified the new code has been implemented and is functioning as expected (When user doesn't have the IP Info Rights, they will not be presented with the Enable IP Information checkbox during the Temporary Accounts Onboarding Dialog).