Browse Source

Revert "Automatically set UserId to current user's id in get-list methods."

pull/87/head 0.8.4
gdlcf88 6 years ago
parent
commit
018de4f7f1
  1. 2
      common.props
  2. 6
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
  3. 6
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
  4. 6
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs
  5. 5
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs

2
common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.8.3</Version>
<Version>0.8.4</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>

6
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs

@ -65,12 +65,6 @@ namespace EasyAbp.EShop.Orders.Orders
public override async Task<PagedResultDto<OrderDto>> GetListAsync(GetOrderListDto input)
{
if (!input.CustomerUserId.HasValue &&
!await AuthorizationService.IsGrantedAsync(OrdersPermissions.Orders.Manage))
{
input.CustomerUserId = CurrentUser.GetId();
}
if (input.CustomerUserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage);

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

@ -69,12 +69,6 @@ namespace EasyAbp.EShop.Payments.Payments
public override async Task<PagedResultDto<PaymentDto>> GetListAsync(GetPaymentListDto input)
{
if (!input.UserId.HasValue &&
!await AuthorizationService.IsGrantedAsync(PaymentsPermissions.Payments.Manage))
{
input.UserId = CurrentUser.GetId();
}
if (input.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Payments.Manage);

6
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs

@ -60,12 +60,6 @@ namespace EasyAbp.EShop.Payments.Refunds
public override async Task<PagedResultDto<RefundDto>> GetListAsync(GetRefundListDto input)
{
if (!input.UserId.HasValue &&
!await AuthorizationService.IsGrantedAsync(PaymentsPermissions.Refunds.Manage))
{
input.UserId = CurrentUser.GetId();
}
if (input.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Refunds.Manage);

5
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs

@ -78,11 +78,6 @@ namespace EasyAbp.EShop.Plugins.Baskets.BasketItems
{
await CheckGetListPolicyAsync();
if (!input.UserId.HasValue && !await IsCurrentUserManagerAsync())
{
input.UserId = CurrentUser.GetId();
}
if (input.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(BasketsPermissions.BasketItem.Manage);

Loading…
Cancel
Save