-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
Description
In the API User admin, if you assigned a user a custom rate limit and then went back and made further updates on that user, each custom rate limit assigned to the user would end up being duplicated and saved on the user.
As a quick example:
- Let's say you started by creating a user with a custom rate limit of 10 requests per minute.
- When editing that user for the first time, the form would correctly show the single custom rate limit entry for 10 request per minute.
- If you then changed the 10 to a 5 and hit save, the save would succeed, but if you viewed the record again, you would see that that save didn't do what you expected. Instead of updating the existing limit, you'd instead of 2 separate limits present, one for 10 request/minute and another for 5 request/min.
- Let's say you then made another non-rate limit change to the user (eg, changing their name). The existing 2 limits would be duplicated again, and you'd end up with this mess:
This is a pretty unfortunate bug, since it makes editing any records with custom rate limits pretty broken.
This bug is not present when editing custom rate limit entries in the API Backends (despite the forms being largely the same).