Refactor permissions of GreenField

This commit is contained in:
nicolas.dorier
2020-03-19 19:11:15 +09:00
parent eac33d494a
commit 29a807696b
31 changed files with 581 additions and 404 deletions

View File

@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Authentication;
using BTCPayServer.Services;
using BTCPayServer.Security.Bitpay;
using BTCPayServer.Client;
namespace BTCPayServer.Security.Bitpay
{
@@ -54,7 +55,7 @@ namespace BTCPayServer.Security.Bitpay
var anyoneCanInvoice = store.GetStoreBlob().AnyoneCanInvoice;
switch (requirement.Policy)
{
case Policies.CanCreateInvoice.Key:
case Permission.CanCreateInvoice:
if (!isAnonymous || (isAnonymous && anyoneCanInvoice))
{
context.Succeed(requirement);