Page MenuHomePhabricator

Administrator assigns Client Developer to rate limit class
Closed, ResolvedPublic

Description

"As an Administrator, I want to assign a Client Developer to a rate limit class, so that the developer has the rate limit of that class."

User story 8 implies that it should be possible to assign client IDs to a class; this makes it explicit. I think this would be 1:many; a client ID would be a member of exactly one class. I don't believe it makes sense to be a member of more than one class (which limit would you use?) or zero classes.

Event Timeline

@Pchelolo - Why is this ticket blocked? How can it be unblocked?

@Pchelolo - Why is this ticket blocked? How can it be unblocked?

Because it's implemented in the new extension that did not pass all the reviews/got deployed yet.

Ok, So I have my client and I got a token, decoded a token, got ratelimit: 500/hour.

Then I go and execute:

mwscript extensions/OAuthRateLimiter/maintenance/setClientTierName.php --wiki metawiki --client 0dc68229f0eef6753e22fffaab0f3363 --tier preferred
Successfully added tier preferred for 0dc68229f0eef6753e22fffaab0f3363.

Then I go to meta wiki and update my consumer and reset a token, decode it and what do I see?

"ratelimit": {
  "request_per_unit": 25000,
  "unit": "HOUR"
},

Good here. @Pchelolo I'm going to set up a few client IDs for testing, and I'll ask to you put them into different tiers.