Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to limit requests per user, quotas #263

Closed
samwiseg0 opened this issue Dec 14, 2020 · 7 comments · Fixed by #1277
Closed

Ability to limit requests per user, quotas #263

samwiseg0 opened this issue Dec 14, 2020 · 7 comments · Fixed by #1277

Comments

@samwiseg0
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The ability to limit the amount of requests a particular user can make. This could be done on a per user basis or another thought would be to create permission groups that would have the limits set. That would make it easier to manage multiple users at once vs changing it per user individually.

Describe the solution you'd like
To have limits that are imposed per user/group. User feedback of their limits would also be necessary. Currently Ombi does a rolling 7 day request rate. Not sure if you would want to implement the same or have that be configurable. Other options could be x day rolling and x number per month.

@samwiseg0 samwiseg0 changed the title Ability to limit requests per user Ability to limit requests per user, quotas Dec 21, 2020
@ankarhem
Copy link
Contributor

ankarhem commented Feb 6, 2021

What do you think of this spec? @sct @samwiseg0

Permission groups:
Users with settings permission can create/modify/delete them.
Users with user management permission can assign users a permission group.
If a permission group is deleted and a user had that permission group, it falls back on the permissions that are set for the user.
A permission group contains what permissions they have, and a quota.
Making user specific changes to quota / permissions will override the ones in the permission group.
Reapplying a permission group to a user will reset any user specific quota / permission settings.

Quotas:
Both the duration and number of requests are configurable.
A rolling quota. This means that the comparison is made for the previous X day period.
When the quota is maxed, a dialog window is presented when trying to request an item explaining that they have maxed out their quota.

@TheCatLady
Copy link
Collaborator

TheCatLady commented Feb 7, 2021

Is the common user really going to have so many users that permission groups are necessary? I feel like a default quota option would be sufficient for all but those who are hosting paid Plex shares...

Especially with the Bulk Edit feature, I don't think that permission groups are necessary.

@sct
Copy link
Owner

sct commented Feb 7, 2021

I kind of agree with @TheCatLady here. At least for the initial version of this. A configurable default rolling period and quotas. Then the ability to modify those per user (or bulk edit them).

I do like the idea of permission groups but the amount of work that will have to go into that versus just focusing on quotas is pretty immense. Let's get the feature out and look at maybe rolling them into groups in the future.

@ankarhem
Copy link
Contributor

ankarhem commented Feb 7, 2021 via email

@samwiseg0
Copy link
Collaborator Author

Permission groups:
Users with settings permission can create/modify/delete them.
Users with user management permission can assign users a permission group.
If a permission group is deleted and a user had that permission group, it falls back on the permissions that are set for the user.
A permission group contains what permissions they have, and a quota.
Making user specific changes to quota / permissions will override the ones in the permission group.
Reapplying a permission group to a user will reset any user specific quota / permission settings.

I agree with @sct and @TheCatLady. This can be a later down the road option. I just thought this would be nice for those that have quite a few users. For example, I don't impose limits on my family members or when I do they are much higher than other users. Doing that in one place would be a nice to have feature.

Quotas:
Both the duration and number of requests are configurable.

Yes

A rolling quota. This means that the comparison is made for the previous X day period.

Yes

When the quota is maxed, a dialog window is presented when trying to request an item explaining that they have maxed out their quota.

Yes. They should be able to see what they have available in their user page as well.

@ankarhem
Copy link
Contributor

ankarhem commented Feb 7, 2021

Can you assign this to me?

@github-actions
Copy link

github-actions bot commented Apr 1, 2021

🎉 This issue has been resolved in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants