-
-
Save ruthgeridema/e4d7304f3bcbf5c18117dddb82c5890e to your computer and use it in GitHub Desktop.
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/GuestPrintCreditmemo.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- vendor/fooman/pdfcustomiser-implementation-m2/src/Plugin/Order/GuestPrintCreditmemo.php (date 1555327511000) | |
+++ vendor/fooman/pdfcustomiser-implementation-m2/src/Plugin/Order/GuestPrintCreditmemo.php (date 1555327511000) | |
@@ -34,7 +34,11 @@ | |
if ($creditmemoId) { | |
$creditmemo = $this->creditmemoRepository->get($creditmemoId); | |
- if ($creditmemo) { | |
+ $creditOrder = $creditmemo->getOrder(); | |
+ | |
+ if ($creditmemo && | |
+ $this->orderViewAuthorization->canView($creditOrder) | |
+ ) { | |
$document = $this->creditmemoDocumentFactory->create( | |
['data' => ['creditmemo' => $creditmemo]] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment