mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
fix(API): Fixed an issue where the API key couldn't delete a request #4489
This commit is contained in:
parent
34aa07c331
commit
8e42dbf8f7
2 changed files with 14 additions and 1 deletions
|
@ -45,7 +45,12 @@ namespace Ombi.Core.Engine.Interfaces
|
|||
|
||||
protected async Task<bool> IsInRole(string roleName)
|
||||
{
|
||||
return await UserManager.IsInRoleAsync(await GetUser(), roleName);
|
||||
if (Username.Equals("API", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
var user = await GetUser();
|
||||
return await UserManager.IsInRoleAsync(user, roleName);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<RuleResult>> RunRequestRules(BaseRequest model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue