Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace EasyAbp.EShop.Payments.Payments
public class PaymentAppService : ReadOnlyAppService<Payment, PaymentDto, Guid, GetPaymentListDto>,
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;
Expand All @@ -45,7 +45,7 @@ public override async Task<PaymentDto> GetAsync(Guid id)

if (payment.UserId != CurrentUser.GetId())
{
await CheckPolicyAsync(GetPolicyName);
await CheckPolicyAsync(PaymentsPermissions.Payments.Manage);
}

return payment;
Expand All @@ -69,7 +69,7 @@ public override async Task<PagedResultDto<PaymentDto>> GetListAsync(GetPaymentLi
{
if (input.UserId != CurrentUser.GetId())
{
await CheckPolicyAsync(GetListPolicyName);
await CheckPolicyAsync(PaymentsPermissions.Payments.Manage);
}

return await base.GetListAsync(input);
Expand Down