From 624f0601ea743b2e421dc6a108d055cbf3e9eef8 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Mon, 12 Oct 2020 17:09:19 +0800 Subject: [PATCH] Add AuthorizeAttribute on the overriden GetListAsync methods Upgdade PaymentService module to v1.5.1 --- common.props | 2 +- .../EasyAbp/EShop/Orders/Orders/OrderAppService.cs | 1 + .../EasyAbp.EShop.Payments.Application.Contracts.csproj | 2 +- .../EasyAbp/EShop/Payments/Payments/PaymentAppService.cs | 1 + .../EasyAbp/EShop/Payments/Refunds/RefundAppService.cs | 1 + .../EasyAbp.EShop.Payments.Domain.Shared.csproj | 2 +- .../EShop/Plugins/Coupons/Coupons/CouponAppService.cs | 1 + .../EShopSample.Application.Contracts.csproj | 6 +++--- .../EShopSample.Application/EShopSample.Application.csproj | 6 +++--- .../EShopSample.Domain.Shared.csproj | 6 +++--- .../src/EShopSample.Domain/EShopSample.Domain.csproj | 6 +++--- .../EShopSample.EntityFrameworkCore.csproj | 6 +++--- .../EShopSample.HttpApi.Client.csproj | 6 +++--- .../src/EShopSample.HttpApi/EShopSample.HttpApi.csproj | 6 +++--- .../aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj | 6 +++--- 15 files changed, 31 insertions(+), 27 deletions(-) diff --git a/common.props b/common.props index fe7c5584..f4b0fa60 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 1.3.1 + 1.3.2 $(NoWarn);CS1591 true EasyAbp Team diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs index 50b1d097..403bce43 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs @@ -58,6 +58,7 @@ namespace EasyAbp.EShop.Orders.Orders return query; } + [Authorize] public override async Task> GetListAsync(GetOrderListDto input) { if (input.CustomerUserId != CurrentUser.GetId()) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj index 47bce794..c5845f62 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj @@ -8,7 +8,7 @@ - + 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 0710160c..9773a811 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 @@ -62,6 +62,7 @@ namespace EasyAbp.EShop.Payments.Payments } // Todo: should a store owner user see orders of other stores in the same payment/refund? + [Authorize] public override async Task> GetListAsync(GetPaymentListDto input) { if (input.UserId != CurrentUser.GetId()) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs index 6b63413e..fa0d8634 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs @@ -69,6 +69,7 @@ namespace EasyAbp.EShop.Payments.Refunds } // Todo: should a store owner user see orders of other stores in the same payment/refund? + [Authorize] public override async Task> GetListAsync(GetRefundListDto input) { if (input.UserId != CurrentUser.GetId()) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj index d4a55640..9fa31482 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj @@ -10,7 +10,7 @@ - + diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs index 35ea5cc7..4cdaf9fb 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs @@ -67,6 +67,7 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons return FillCouponTemplateData(await MapToGetOutputDtoAsync(coupon), couponTemplate); } + [Authorize] public override async Task> GetListAsync(GetCouponListInput input) { if (input.UserId != CurrentUser.GetId()) diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj index 841127a7..005a751f 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj index 33caa4e5..9351118e 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj @@ -17,9 +17,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj index c04a279b..c1f291c4 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj index bacf8930..79b6af79 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj index aede09ee..849e2e23 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj index 762e00b1..a5640025 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj index c4b4aece..e9909520 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj index 4cf5e105..3ab20c09 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj @@ -50,9 +50,9 @@ - - - + + +