Page MenuHomePhabricator

Add rights properties to list=allusers and list=users
Closed, ResolvedPublic


Currently there is no way to get the userrights of one (or more) certain users directly.
The userrights can be queried from siteinfo[1], but then have to be matched against each user group.

I suggest adding "rights" to "auprop" and "usprop".
And if possible with performance perhaps add "usright" and "auright" aswell to only list users with certain rights.


Version: 1.17.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport set Reference to bz25767.

Rights are done in code (well, as are groups, but group membership is in the database)...

So to do it User::getGroupsWithPermission(), and then just have that override/merge against groups, and do the lookup.

Little faffy, but doesn't seem too bad, I mean, if we're already filtering on groups.

Then for getting rights.. Make sure we pull groups from DB, and then push it through User::getGroupPermissions(), and cache that locally for a bit of saving

Per IRC comment from Reedy:

I mean to get a list of all rights per user, not rights per group.

So a lot like this returns for the current user:

Difference being that it's not for me me but for one or more other users.

Also r79552 .

And a bug 26559 "list=allusers auprop=rights does not match list=users usprop=rights "