From 73488edd58407f4a3bf2e0eb9e7178978f3af742 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Tue, 2 Jun 2020 16:49:44 +0800 Subject: [PATCH] Fixed permission check in OrderAppService --- .../EasyAbp/EShop/Orders/Orders/OrderAppService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 2989f497..bc53c559 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 @@ -63,7 +63,7 @@ namespace EasyAbp.EShop.Orders.Orders { if (input.CustomerUserId != CurrentUser.GetId()) { - await AuthorizationService.IsGrantedAsync(OrdersPermissions.Orders.Manage); + await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage); if (input.StoreId.HasValue) { @@ -71,7 +71,7 @@ namespace EasyAbp.EShop.Orders.Orders } else { - await AuthorizationService.IsGrantedAsync(OrdersPermissions.Orders.CrossStore); + await AuthorizationService.CheckAsync(OrdersPermissions.Orders.CrossStore); } } @@ -86,7 +86,7 @@ namespace EasyAbp.EShop.Orders.Orders if (order.CustomerUserId != CurrentUser.GetId()) { - await AuthorizationService.IsGrantedAsync(OrdersPermissions.Orders.Manage); + await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage); // Todo: Check if current user is an admin of the store. }