Greenfield: Fix invoice refund permission (#5558)

This commit is contained in:
Andrew Camilleri
2023-12-14 11:15:36 +01:00
committed by GitHub
parent 97fda9d362
commit e4aaff5e34
3 changed files with 10 additions and 8 deletions

View File

@@ -138,11 +138,8 @@ namespace BTCPayServer.Controllers
}
if (!ModelState.IsValid)
return View(model);
if (model.AutoApproveClaims)
{
model.AutoApproveClaims = (await
_authorizationService.AuthorizeAsync(User, storeId, Policies.CanCreatePullPayments)).Succeeded;
}
model.AutoApproveClaims = model.AutoApproveClaims && (await
_authorizationService.AuthorizeAsync(User, storeId, Policies.CanCreatePullPayments)).Succeeded;
await _pullPaymentService.CreatePullPayment(new HostedServices.CreatePullPayment()
{
Name = model.Name,