Last modified: 2011-02-08 21:57:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27767, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25767 - Add rights properties to list=allusers and list=users
Add rights properties to list=allusers and list=users
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-03 13:00 UTC by Krinkle
Modified: 2011-02-08 21:57 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2010-11-03 13:00:56 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
Comment 1 Sam Reed (reedy) 2011-01-03 21:14:20 UTC
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
Comment 2 Krinkle 2011-01-04 01:05:04 UTC
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.
Comment 3 Sam Reed (reedy) 2011-01-04 02:15:19 UTC
r79545, r79549
Comment 4 Krinkle 2011-01-04 02:36:14 UTC
Also r79552 .

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links