-
-
Save ruthgeridema/9edac8c81874b671918150dae3402ce5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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