Background
Following T264150: User needs to request access to IP information [L] users with the 'ipinfo' right must check a box to indicate that they will use the tool only for anti-abuse purposes. This will be stored as a user preference. Users with both the right and the preference set will be able to use the tool.
Problem
We may need to ask users to re-permission periodically. This means we need to know who has access to the tool and how long they have had access for.
This will be particularly important once users other than checkusers have access to this tool. (Checkusers have already agreed to https://meta.wikimedia.org/wiki/Confidentiality_agreement_for_nonpublic_information)
We also need to be able to tell the difference between someone changing their user preference to give up access to the tool, vs someone having their access revoked.
Solution
See T263756#7469467 and T263756#7471822 (tl;dr: Use the logging table).
To do this we will need a new table in the IPInfo extension that stores the user name, the timestamp when they first gained access, and whether they have had their access revoked. If a user unsets the preference, their row can be deleted from this table.
Proposed schema: T263756#6525579
Notes on the process: T263756#7391325
Acceptance criteria
-
Gain DBA approval for the new table. We'll need to provide the table structure and estimates of the following information (from T260372#6482475):
- size of the table (number of rows expected)
- expected growth per year (number of rows)
- Expected writes to the table (per minute, per hour...per day, any of those are ok).
- Expected amount of reads
- Can this table be public or private (so we know if it can be replicated to our public cloud infra or it needs to be filtered)
- The release plan for the feature (are there specific wikis you'd like to test first etc)
-
Create the new table