This repository was archived by the owner on Feb 15, 2026. It is now read-only.
feat: Allow admin/owner to opt out of auto-approval#4308
Open
fronc wants to merge 2 commits intosct:developfrom
Open
feat: Allow admin/owner to opt out of auto-approval#4308fronc wants to merge 2 commits intosct:developfrom
fronc wants to merge 2 commits intosct:developfrom
Conversation
…requests Admins/owners can now disable their auto-approve permissions, allowing their requests to enter the pending queue like regular users. Changes: - Modified hasPermission() to not auto-bypass for AUTO_APPROVE* permissions - Removed MANAGE_REQUESTS from auto-approve permission checks - Allow owner (ID 1) to modify their own auto-approve settings via API - Updated UI to enable owner to toggle auto-approve permissions This enables admins to opt into manual approval workflows when needed. Fixes sct#4031
|
Just to let you know, Overseerr and Jellyseerr are currently in the process of merging into Seerr. As such, all development is now happening here: https://github.com/seerr-team/seerr (previously the Jellyseerr repo) The announcement can be found on the Seerr (previously Overseerr) Discord server: https://discord.com/channels/783137440809746482/785475251231784961/1424781317471473837
Invite link: https://discord.gg/seerr |
Closed
1 task
When hasPermission is called with 0 (no permission required), return true immediately. This was accidentally removed during the admin auto-approve fix, breaking /auth/me for non-admin users.
Author
|
Thanks for the heads up @SerenModz21 ! I have migrated to Seerr, and also submitted the PR over there since it's the same lines that require the change. See you over there from now on! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Allow Admin/Owner to Opt Out of Auto-Approval
Summary
This PR implements an option for admin and owner accounts to disable auto-approval of their own requests, addressing a long-standing feature request. Admin requests can now go through the normal pending → approved flow, enabling integration with third-party tools and manual queue management.
Closes #3926
Problem
Currently, any request made by an admin or owner account is automatically approved and begins processing immediately. This behavior:
Solution
Modified the permission system to treat auto-approve permissions explicitly for admin users, rather than granting them implicitly via the admin role.
Key Changes
server/lib/permissions.tsisAutoApprovePermission()helper functionhasPermission()to NOT bypass auto-approve permission checks for admin userspermissions === 0early return forisAuthenticated()with no argsserver/entity/MediaRequest.tsPermission.MANAGE_REQUESTSfrom auto-approval status checkserver/routes/user/usersettings.tsFrontend Components
PermissionOptionto allow owner to toggle auto-approve in UIPermission Behavior Matrix
MANAGE_*(Users, Requests, Issues)REQUEST*,VIEW*,CREATE*AUTO_APPROVE*AUTO_REQUEST*How to Use
For Admins Who Want Pending Requests
New requests will now go to Pending status instead of being automatically approved.
For Admins Who Want Original Behavior
No action needed. Ensure auto-approve permissions remain checked (they are granted by default for new admin accounts).
Testing Performed
Functional Tests
/auth/mereturns 200)Edge Cases Verified
hasPermission(0, ...)returnstrue(any logged-in user)hasPermission([], ...)returnstrue(empty array)hasPermission([AUTO_APPROVE], ...)requires explicit bit for adminhasPermission([MANAGE_REQUESTS], ...)allows admin bypassComprehensive Permission Audit
All permission behaviors preserved with one intentional change:
Breaking Changes
None. This is backwards-compatible: