This commit is contained in:
tidusjar 2021-05-09 19:58:36 +01:00
parent 50af2b8482
commit 64c0fc17cc
8 changed files with 21 additions and 11 deletions

View file

@ -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);