Page MenuHomePhabricator

Filter by block status in "Allusers" API
Open, Needs TriagePublic

Description

This task is about enhancing the Allusers API to include the blocked state of the accounts listed with in. More context below...


Use case

As a team who is surfacing information from the AllUsers API within the tools we are building [i], we need to know which users within this data set have been permanently blocked, so that we can decide to exclude this set of blocked accounts from appearing within the interface we are building.

Background

This issue comes in responses to an incident where offensive usernames that had been blocked were appearing within the Reply and New Discussion Tools' username suggestion list (read: the dropdown that appears when someone types @ to at-mention another person).

Note: as an interim fix, the Editing Team deployed a downstream fix that will exclude permanently blocked users from DiscussionTools' username suggestion list API results. More in T294783.


i. In this scenario, we are referring to the Reply and New Discussion Tools.

Event Timeline

According to https://www.mediawiki.org/w/api.php?modules=query+allusers there is auprop=blockinfo, but that was already used in the linked fix - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/735989/

There is no way to filter the result according to block state on the server side, but that seems not requested/suggested here.

I am not sure if this ticket is relevant to the product infrastructure team. Untagging us for now feel, free to re-add if its somehow related.

matmarex renamed this task from Add block status to "Allusers" API to Filter by block status in "Allusers" API.Nov 8 2021, 7:46 PM

According to https://www.mediawiki.org/w/api.php?modules=query+allusers there is auprop=blockinfo, but that was already used in the linked fix - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/735989/

There is no way to filter the result according to block state on the server side, but that seems not requested/suggested here.

What you're saying above is acrruate, @Umherirrender – the ticket, as currently written, does not make sense considering, as you identified, the Allusers API already includes information about block status.

I need to instead modify this ticket to make it about clients being able to request a filtered list (e.g. "show me Allusers who have not been permanently blocked") from the Allusers API rather than them having to do this work themselves.