Page MenuHomePhabricator

Implement `user.search` Conduit API method
Closed, ResolvedPublic

Description

Our use case is that we want to disable users who are no longer in LDAP. We additionally have users in phabricator that aren't in LDAP (such as bots, mailing list users, etc.). Ideally we'd be able to "find all non-disabled human users" to be able to be able to compare it with a canonical source of information.

Event Timeline

epriestley renamed this task from conduit API to search for users based on roles to Implement `user.search` Conduit API method.Mar 7 2016, 5:33 PM
epriestley added a project: People.
eadler added a project: Restricted Project.Mar 28 2016, 8:20 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Mar 28 2016, 8:29 PM
scode moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Apr 7 2016, 9:44 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 13 2016, 9:15 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 13 2016, 9:50 PM

To further elaborate:

Even when obtaining *all* users (without criteria) in a paginating fashion with user.query(), it's preferable to have this because it is cursor based and doesn't suffer from O(offset) performance characteristic which is bad enough to be a real problem for 10k+ users.

scode moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 20 2016, 11:30 PM

FWIW is something like user.edit on the table? We'd like to be able to pre-create users with specific information such as 'real name', and a particular external account linked.

eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 21 2016, 4:05 PM

I think T5953 is a better fit for that in the upstream.

After D15959, user.search should support "find all non-disabled human users", likely with parameters in this vein:

{
  "constraints": {
    "isDisabled": false,
    "isBot": false
  }
}

The method returns slightly less information than user.search did; open to adding more information but it sounds like you don't need it for this use case. Some old keys like uri and image might be better as dictionaries now, so they can return multiple URIs, multiple resolutions, etc.

These changes are live on this install:

We can return more data easily if anything is missing, but I want to do that case-by-case and try to future-proof whatever format we're emitting so the "v3" API can last us for at least a few years. I don't have any specific additional changes planned, so pausing this for feedback.


GoalRefTimeNotes
user.searchD159590.5 HoursImplement basic modern user.search Conduit API method.
Subtotal0.5 Hours
Cumulative Total0.5 Hours
epriestley claimed this task.

Appears resolved and accounted for.