Page MenuHomePhabricator

ApiQueryUserInfo: Allow showing what ratelimits would be if they applied
Closed, ResolvedPublicFeature

Description

User story

As a user,
When I have global rollback rights, which come with noratelimit rights globally[1]
And I want to perform an action that is normally rate limited,
And I do not want to exceed the ratelimits that would apply, if I did not have noratelimit rights[2]
I want to be able to check what the ratelimits would be

Details

Yes, rate limits can be calculated manually be looking through each extension's default configuration, then the WMF configuration (common settings and local), then the relevant user groups, but it would be more straightforward, and more helpful, if this was added as an option to the userinfo api.

https://en.wikipedia.org/w/api.php?action=query&meta=userinfo&uiprop=ratelimits shows the user's rate limits, and for those with noratelimit rights, just shows "ratelimits": {}
I propose adding another accepted value to uiprop, theoreticalratelimits[3], to show what ratelimits would be if they applied to the user

[1] https://meta.wikimedia.org/wiki/Special:GlobalGroupPermissions/global-rollbacker
[2] Eg, on enwiki, per https://en.wikipedia.org/wiki/Wikipedia:Global_rights_policy#Global_rollbackers global rollbackers should only use noratelimit "in the context of counter-vandalism efforts (unless they hold such rights separately in a usergroup permitting local use for other reasons)"
[3] Name up for discussion

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 616250 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ApiQueryUserInfo: Add theoreticalratelimits

https://gerrit.wikimedia.org/r/616250

DannyS712 changed the subtype of this task from "Task" to "Feature Request".Jul 26 2020, 9:47 AM
DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.
DannyS712 updated the task description. (Show Details)Jul 28 2020, 9:01 PM
eprodromou triaged this task as Low priority.Sep 8 2020, 8:50 PM

Change 616250 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryUserInfo: Add theoreticalratelimits

https://gerrit.wikimedia.org/r/616250

DannyS712 closed this task as Resolved.Sep 15 2020, 7:35 PM
DannyS712 edited projects, added User-notice; removed Patch-For-Review.

Confirmed to work on the beta cluster

I'm confused. Tech News made it seem like this change would cause users with noratelimit to start hitting limits, but it seems like it's just adding the option to see what the limits would be. Am I correct that rate limits still won't apply to those with noratelimit?

I'm confused. Tech News made it seem like this change would cause users with noratelimit to start hitting limits, but it seems like it's just adding the option to see what the limits would be. Am I correct that rate limits still won't apply to those with noratelimit?

Yes, that is correct. noratelimit will still allow users to ignore rate limits

Jar added a subscriber: Jar.Sep 22 2020, 5:42 PM
Restricted Application added a subscriber: alaa. · View Herald TranscriptSep 22 2020, 5:42 PM