mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Allow users with CanViewPaymentRequests to view payment requests (#5551)
This commit is contained in:
parent
0e2379caa6
commit
e3863ac076
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ using StoreData = BTCPayServer.Data.StoreData;
|
|||
|
||||
namespace BTCPayServer.Controllers
|
||||
{
|
||||
[Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
|
||||
[Route("payment-requests")]
|
||||
[Authorize(Policy = Policies.CanViewPaymentRequests, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
|
||||
public class UIPaymentRequestController : Controller
|
||||
{
|
||||
private readonly UIInvoiceController _InvoiceController;
|
||||
|
@ -69,7 +69,6 @@ namespace BTCPayServer.Controllers
|
|||
FormDataService = formDataService;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("/stores/{storeId}/payment-requests")]
|
||||
[Authorize(Policy = Policies.CanViewPaymentRequests, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
|
||||
public async Task<IActionResult> GetPaymentRequests(string storeId, ListPaymentRequestsViewModel model = null)
|
||||
|
@ -363,6 +362,7 @@ namespace BTCPayServer.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("{payReqId}/cancel")]
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> CancelUnpaidPendingInvoice(string payReqId, bool redirect = true)
|
||||
{
|
||||
var result = await _PaymentRequestService.GetPaymentRequest(payReqId, GetUserId());
|
||||
|
|
Loading…
Add table
Reference in a new issue