Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Index: vendor/fooman/pdfcustomiser-implementation-m2/src/Plugin/Order/GuestPrintShipment.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- vendor/fooman/pdfcustomiser-implementation-m2/src/Plugin/Order/GuestPrintShipment.php (date 1555328863000)
+++ vendor/fooman/pdfcustomiser-implementation-m2/src/Plugin/Order/GuestPrintShipment.php (date 1555328863000)
@@ -34,8 +34,11 @@
if ($shipmentId) {
$shipment = $this->shipmentRepository->get($shipmentId);
-
- if ($shipment) {
+ $shipmentOrder = $shipment->getOrder();
+
+ if ($shipment &&
+ $this->orderViewAuthorization->canView($shipmentOrder)
+ ) {
$document = $this->shipmentDocumentFactory->create(
['data' => ['shipment' => $shipment]]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.