From b95238e4175a0a403c6c3c296730edc90cd435ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20A=2EP?= <53834183+Jossec101@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:49:25 +0100 Subject: [PATCH] Restrict wallet edition and moving funds out of wallets to Finance Managers --- src/Pages/Wallets.razor | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/Pages/Wallets.razor b/src/Pages/Wallets.razor index 53606168..58935f9d 100644 --- a/src/Pages/Wallets.razor +++ b/src/Pages/Wallets.razor @@ -33,7 +33,7 @@ @ref="_walletsDataGrid" @bind-SelectedRow="_selectedWallet" Data="_wallets" - Editable="@_isFinanceManager" + Editable="true" EditMode="DataGridEditMode.Popup" Responsive="true" ResizeMode="TableResizeMode.Columns" @@ -55,8 +55,7 @@ - @if (_isFinanceManager) - { + @@ -67,19 +66,20 @@ - } - + + + Edit + Transfer funds + - Edit Details Get address - Transfer funds Rescan wallet Export output descriptor @@ -784,8 +784,6 @@ private Modal _finaliseModalRef; private Wallet? _selectedWalletToFinalise; - private bool _isFinanceManager = false; - private decimal _btcPrice; private Check _hotWalletCheckComponent; @@ -862,10 +860,6 @@ } if (LoggedUser != null) { - if (ClaimsPrincipal.IsInRole(ApplicationUserRole.FinanceManager.ToString())) - { - _isFinanceManager = true; - } await GetData(); } }