Remove right to admins to bypass permissions to modify/view invoices or stores (#3297)

This commit is contained in:
Nicolas Dorier 2022-01-13 17:42:32 +09:00 committed by GitHub
parent 5ad6d77973
commit f67fa6a5d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: