From 8089a938f386659dfd7909dc1f1deb1aa8599897 Mon Sep 17 00:00:00 2001 From: d11n Date: Wed, 24 Jan 2024 11:34:16 +0100 Subject: [PATCH] Guest role: Fix redirect after store creation (#5689) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that guests land on the invoices list, which tehy are allowed to see — rather than the dashboard, which they don't have permissions for. Fixes #5688. --- BTCPayServer/Components/StoreSelector/Default.cshtml | 2 +- BTCPayServer/Controllers/UIUserStoresController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Components/StoreSelector/Default.cshtml b/BTCPayServer/Components/StoreSelector/Default.cshtml index 923ea634e..50e3ae140 100644 --- a/BTCPayServer/Components/StoreSelector/Default.cshtml +++ b/BTCPayServer/Components/StoreSelector/Default.cshtml @@ -60,7 +60,7 @@ else {
  • } -
  • Create Store
  • +
  • Create Store
  • @if (Model.ArchivedCount > 0) {
  • diff --git a/BTCPayServer/Controllers/UIUserStoresController.cs b/BTCPayServer/Controllers/UIUserStoresController.cs index faefac503..b795803e7 100644 --- a/BTCPayServer/Controllers/UIUserStoresController.cs +++ b/BTCPayServer/Controllers/UIUserStoresController.cs @@ -90,7 +90,7 @@ namespace BTCPayServer.Controllers await _repo.CreateStore(GetUserId(), store); CreatedStoreId = store.Id; TempData[WellKnownTempData.SuccessMessage] = "Store successfully created"; - return RedirectToAction(nameof(UIStoresController.Dashboard), "UIStores", new + return RedirectToAction(nameof(UIStoresController.Index), "UIStores", new { storeId = store.Id });