mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 16:52:56 -07:00
Fixed #4152
This commit is contained in:
parent
50af2b8482
commit
64c0fc17cc
8 changed files with 21 additions and 11 deletions
|
@ -71,7 +71,7 @@ namespace Ombi.Core.Engine
|
|||
var canRequestOnBehalf = model.RequestOnBehalf.HasValue();
|
||||
|
||||
var isAdmin = await UserManager.IsInRoleAsync(userDetails, OmbiRoles.PowerUser) || await UserManager.IsInRoleAsync(userDetails, OmbiRoles.Admin);
|
||||
if (model.RequestOnBehalf.HasValue() && !isAdmin)
|
||||
if (canRequestOnBehalf && !isAdmin)
|
||||
{
|
||||
return new RequestEngineResult
|
||||
{
|
||||
|
@ -703,7 +703,7 @@ namespace Ombi.Core.Engine
|
|||
{
|
||||
await MovieRepository.Add(model);
|
||||
|
||||
var result = await RunSpecificRule(model, SpecificRules.CanSendNotification);
|
||||
var result = await RunSpecificRule(model, SpecificRules.CanSendNotification, requestOnBehalf);
|
||||
if (result.Success)
|
||||
{
|
||||
await NotificationHelper.NewRequest(model);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue