Skip to content

Commit 068e723

Browse files
Respect order setting DisplayOrdersOfAllStores
1 parent b9d51b0 commit 068e723

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Presentation/SmartStore.Web/Controllers/OrderController.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public partial class OrderController : PublicControllerBase
4242
private readonly IPaymentService _paymentService;
4343
private readonly IShippingService _shippingService;
4444
private readonly ICountryService _countryService;
45+
private readonly OrderSettings _orderSettings;
4546

4647
#endregion
4748

@@ -57,7 +58,8 @@ public OrderController(
5758
IOrderProcessingService orderProcessingService,
5859
IPaymentService paymentService,
5960
IShippingService shippingService,
60-
ICountryService countryService)
61+
ICountryService countryService,
62+
OrderSettings orderSettings)
6163
{
6264
_dateTimeHelper = dateTimeHelper;
6365
_pdfConverter = pdfConverter;
@@ -69,6 +71,7 @@ public OrderController(
6971
_paymentService = paymentService;
7072
_shippingService = shippingService;
7173
_countryService = countryService;
74+
_orderSettings = orderSettings;
7275
}
7376

7477
#endregion
@@ -366,6 +369,11 @@ private bool IsNonExistentOrder(Order order)
366369
if (!Services.Permissions.Authorize(Permissions.Order.Read))
367370
{
368371
result = result || (order.StoreId != 0 && order.StoreId != Services.StoreContext.CurrentStore.Id);
372+
373+
if (_orderSettings.DisplayOrdersOfAllStores)
374+
{
375+
result = false;
376+
}
369377
}
370378

371379
return result;

0 commit comments

Comments
 (0)