mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Removed the whitelist
This commit is contained in:
parent
4a63d3601a
commit
121cf90ba7
4 changed files with 3 additions and 43 deletions
|
@ -1234,7 +1234,7 @@ namespace PlexRequests.UI.Modules
|
|||
if (IsAdmin)
|
||||
return true;
|
||||
|
||||
if (s.ApprovalWhiteList.Contains(Username))
|
||||
if (ShouldAutoApprove(type,s,Username))
|
||||
return true;
|
||||
|
||||
var requestLimit = GetRequestLimitForType(type, s);
|
||||
|
@ -1376,8 +1376,8 @@ namespace PlexRequests.UI.Modules
|
|||
public bool ShouldAutoApprove(RequestType requestType, PlexRequestSettings prSettings, string username)
|
||||
{
|
||||
var admin = Security.HasPermissions(Context.CurrentUser, Permissions.Administrator);
|
||||
// if the user is an admin or they are whitelisted, they go ahead and allow auto-approval
|
||||
if (admin || prSettings.ApprovalWhiteList.Any(x => x.Equals(username, StringComparison.OrdinalIgnoreCase))) return true;
|
||||
// if the user is an admin, they go ahead and allow auto-approval
|
||||
if (admin) return true;
|
||||
|
||||
// check by request type if the category requires approval or not
|
||||
switch (requestType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue