From 20647e1857cf3fb6142b60f6b928abfbecc98dc5 Mon Sep 17 00:00:00 2001 From: slarkerino Date: Wed, 16 Apr 2025 22:37:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E5=8D=95=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyAbp/EShop/Payments/Payments/PaymentAppService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs index 8fa7ff13..1f4cd812 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs @@ -21,8 +21,8 @@ namespace EasyAbp.EShop.Payments.Payments public class PaymentAppService : ReadOnlyAppService, IPaymentAppService { - protected override string GetPolicyName { get; set; } = PaymentsPermissions.Payments.Manage; - protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Payments.Manage; + protected override string GetPolicyName { get; set; } = null; + protected override string GetListPolicyName { get; set; } = null; private readonly IDistributedEventBus _distributedEventBus; private readonly IOrderAppService _orderAppService; From be25da3ba35b1b6906bdb10fd3731f84e3cd8eca Mon Sep 17 00:00:00 2001 From: slarkerino Date: Thu, 17 Apr 2025 10:52:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9Aadd=20permission=20=20check=20w?= =?UTF-8?q?hen=20payment=20userId=20not=20match?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyAbp/EShop/Payments/Payments/PaymentAppService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs index 1f4cd812..b26c39d4 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs @@ -45,7 +45,7 @@ namespace EasyAbp.EShop.Payments.Payments if (payment.UserId != CurrentUser.GetId()) { - await CheckPolicyAsync(GetPolicyName); + await CheckPolicyAsync(PaymentsPermissions.Payments.Manage); } return payment; @@ -69,7 +69,7 @@ namespace EasyAbp.EShop.Payments.Payments { if (input.UserId != CurrentUser.GetId()) { - await CheckPolicyAsync(GetListPolicyName); + await CheckPolicyAsync(PaymentsPermissions.Payments.Manage); } return await base.GetListAsync(input);