Browse Source

Merge be25da3ba3 into 48c75e8e50

pull/292/merge
slarkerino 1 month ago
committed by GitHub
parent
commit
2890f9b144
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs

8
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs

@ -22,8 +22,8 @@ namespace EasyAbp.EShop.Payments.Payments
public class PaymentAppService : ReadOnlyAppService<Payment, PaymentDto, Guid, GetPaymentListDto>, public class PaymentAppService : ReadOnlyAppService<Payment, PaymentDto, Guid, GetPaymentListDto>,
IPaymentAppService IPaymentAppService
{ {
protected override string GetPolicyName { get; set; } = PaymentsPermissions.Payments.Manage; protected override string GetPolicyName { get; set; } = null;
protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Payments.Manage; protected override string GetListPolicyName { get; set; } = null;
private readonly IDistributedEventBus _distributedEventBus; private readonly IDistributedEventBus _distributedEventBus;
private readonly IOrderAppService _orderAppService; private readonly IOrderAppService _orderAppService;
@ -49,7 +49,7 @@ namespace EasyAbp.EShop.Payments.Payments
if (payment.UserId != CurrentUser.GetId()) if (payment.UserId != CurrentUser.GetId())
{ {
await CheckPolicyAsync(GetPolicyName); await CheckPolicyAsync(PaymentsPermissions.Payments.Manage);
} }
return payment; return payment;
@ -73,7 +73,7 @@ namespace EasyAbp.EShop.Payments.Payments
{ {
if (input.UserId != CurrentUser.GetId()) if (input.UserId != CurrentUser.GetId())
{ {
await CheckPolicyAsync(GetListPolicyName); await CheckPolicyAsync(PaymentsPermissions.Payments.Manage);
} }
return await base.GetListAsync(input); return await base.GetListAsync(input);

Loading…
Cancel
Save