/GuestPrintShipment.patch Secret
Created
April 15, 2019 12:09
Star
You must be signed in to star a gist
This file contains 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