mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Remove right to admins to bypass permissions to modify/view invoices or stores (#3297)
This commit is contained in:
parent
5ad6d77973
commit
f67fa6a5d6
1 changed files with 3 additions and 9 deletions
|
@ -127,20 +127,14 @@ namespace BTCPayServer.Security
|
|||
if (isAdmin)
|
||||
success = true;
|
||||
break;
|
||||
case Policies.CanViewInvoices:
|
||||
if (store == null || store.Role == StoreRoles.Owner || isAdmin)
|
||||
success = true;
|
||||
break;
|
||||
case Policies.CanModifyStoreSettings:
|
||||
if (store != null && (store.Role == StoreRoles.Owner || isAdmin))
|
||||
if (store != null && (store.Role == StoreRoles.Owner))
|
||||
success = true;
|
||||
break;
|
||||
case Policies.CanViewInvoices:
|
||||
case Policies.CanViewStoreSettings:
|
||||
if (store != null || isAdmin)
|
||||
success = true;
|
||||
break;
|
||||
case Policies.CanCreateInvoice:
|
||||
if (store != null || isAdmin)
|
||||
if (store != null)
|
||||
success = true;
|
||||
break;
|
||||
case Policies.CanViewProfile:
|
||||
|
|
Loading…
Add table
Reference in a new issue