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/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
You can’t perform that action at this time.