Last modified: 2011-02-08 21:57:22 UTC
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. [1] http://commons.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=usergroups
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: http://en.wikipedia.org/w/api.php?action=query&meta=userinfo&uiprop=rights Difference being that it's not for me me but for one or more other users.
r79545, r79549
Also r79552 . And a bug 26559 "list=allusers auprop=rights does not match list=users usprop=rights "