Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

feat(requests): allow admins to bypass user quota limits#4173

Closed
0xSysR3ll wants to merge 2 commits intosct:developfrom
0xSysR3ll:feat-override-user-request-limit
Closed

feat(requests): allow admins to bypass user quota limits#4173
0xSysR3ll wants to merge 2 commits intosct:developfrom
0xSysR3ll:feat-override-user-request-limit

Conversation

@0xSysR3ll
Copy link
Copy Markdown
Contributor

@0xSysR3ll 0xSysR3ll commented Jun 30, 2025

Description

This PR adds the ability for users with MANAGE_REQUESTS permission to bypass quota restrictions when making requests on behalf of other users.

It also introduces a Ignore Quota toggle option in the the requests modal.
When enabled, the request will not count against the user's quota limits, allowing admins to make requests on behalf of users who may have exceeded their quota or for special circumstances.

Screenshot (if UI-related)

Quota exceeded

image

X requests remaining

image

To-Dos

  • Successful build yarn build
  • Translation keys yarn i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

Copy link
Copy Markdown
Collaborator

@OwsleyJr OwsleyJr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like this change but I feel like there should be an option to bypass or not.

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

I actually like this change but I feel like there should be an option to bypass or not.

Glad you like it ! No sure to see what you mean though.
Is it something like : I have the MANAGE_REQUESTS permission but I need an extra/sub permission like BYPASS_QUOTA ?

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 1, 2025

I actually like this change but I feel like there should be an option to bypass or not.

Glad you like it ! No sure to see what you mean though.

Is it something like : I have the MANAGE_REQUESTS permission but I need an extra/sub permission like BYPASS_QUOTA ?

Could just have a toggle on the modal maybe?

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

@OwsleyJr
Maybe wrongly placed but could be wym ?
image
image

@gauthier-th
Copy link
Copy Markdown
Contributor

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 1, 2025

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 1, 2025

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

If they aren't at a limit yet

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

Not sure to follow. This will only show if their quota is exceeded.

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 1, 2025

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

Not sure to follow. This will only show if their quota is exceeded.

I'm thinking as an admin I may or may not want to affect their quota, even if they haven't hit it yet.

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

0xSysR3ll commented Jul 1, 2025

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

Not sure to follow. This will only show if their quota is exceeded.

I'm thinking as an admin I may or may not want to affect their quota, even if they haven't hit it yet.

So, If I understand correctly: As an admin, I should have the option to bypass the user's quota at any time - even if they still have requests remaining - so that the request I make doesn't count against their quota unless I choose otherwise. Right ?

If so, I think that will imply some API change.

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 2, 2025

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

Not sure to follow. This will only show if their quota is exceeded.

I'm thinking as an admin I may or may not want to affect their quota, even if they haven't hit it yet.

So, If I understand correctly: As an admin, I should have the option to bypass the user's quota at any time - even if they still have requests remaining - so that the request I make doesn't count against their quota unless I choose otherwise. Right ?

If so, I think that will imply some API change.

Essentially yes but the main the issue we'll have with this, toggle or not, is we use a user's current requests to track their quota and this PR currently would cause issues with that. So some sort of backend change would be required either way.

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

IMHO a warning just before the "Request" button would be enough, to say something like "be aware that as an admin you will bypass the quota limits the user already reached"

Hmm, in my head I was thinking you might still want still want this to affect their quota.

Not sure to follow. This will only show if their quota is exceeded.

I'm thinking as an admin I may or may not want to affect their quota, even if they haven't hit it yet.

So, If I understand correctly: As an admin, I should have the option to bypass the user's quota at any time - even if they still have requests remaining - so that the request I make doesn't count against their quota unless I choose otherwise. Right ?

If so, I think that will imply some API change.

Essentially yes but the main the issue we'll have with this, toggle or not, is we use a user's current requests to track their quota and this PR currently would cause issues with that. So some sort of backend change would be required either way.

Yep, maybe we should add a flag to the request (e.g. ignoreQuota: true) or something like that.

@OwsleyJr
Copy link
Copy Markdown
Collaborator

OwsleyJr commented Jul 2, 2025

Yep pretty much what we would need to do!

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

0xSysR3ll commented Jul 3, 2025

Hey @OwsleyJr 👋,
Just adapted PR's comment and code accordingly.
Quota can be bypassed either if it is exceeded or not, as we agreed on.

@OwsleyJr
Copy link
Copy Markdown
Collaborator

Hey @OwsleyJr 👋,

Just adapted PR's comment and code accordingly.

Quota can be bypassed either if it is exceeded or not, as we agreed on.

Hey don't want to leave you hanging but on vacation atm. Will try and do a review when I get a chance or hopefully another team member will take a peek.

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

Hey @OwsleyJr 👋,

Just adapted PR's comment and code accordingly.

Quota can be bypassed either if it is exceeded or not, as we agreed on.

Hey don't want to leave you hanging but on vacation atm. Will try and do a review when I get a chance or hopefully another team member will take a peek.

No prob at all! We're all busy with real-life matters.

This PR adds the ability for users with `MANAGE_REQUESTS` permission to bypass quota restrictions when making requests on behalf of other users.
@0xSysR3ll 0xSysR3ll force-pushed the feat-override-user-request-limit branch from ad22341 to a8cb418 Compare August 14, 2025 23:04
@OwsleyJr
Copy link
Copy Markdown
Collaborator

Hey @OwsleyJr 👋,

Just adapted PR's comment and code accordingly.

Quota can be bypassed either if it is exceeded or not, as we agreed on.

Hey don't want to leave you hanging but on vacation atm. Will try and do a review when I get a chance or hopefully another team member will take a peek.

No prob at all! We're all busy with real-life matters.

Hey sorry for the delay. Haven't forgotten about you. We are just holding off on any migration related PRs (announcement coming soon) atm but will keep you updated.

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

Note to myself: migrate this PR to seer's repo

@0xSysR3ll 0xSysR3ll closed this Oct 9, 2025
@0xSysR3ll 0xSysR3ll deleted the feat-override-user-request-limit branch October 9, 2025 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin can't force a request through for a user who has met the request limit

3 participants