Skip to content

Commit bc3a49a

Browse files
Merge pull request #214 from magento-commerce/1.1.73-release
1.1.73 Release
2 parents 83f626c + 6ed8579 commit bc3a49a

11 files changed

+1744
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/quality-patches",
33
"description": "Provides quality patches for AdobeCommerce & Magento OpenSource",
44
"type": "magento2-component",
5-
"version": "1.1.72",
5+
"version": "1.1.73",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches-info.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
diff --git a/vendor/magento/module-company/Plugin/Checkout/Controller/Index/IndexPlugin.php b/vendor/magento/module-company/Plugin/Checkout/Controller/Index/IndexPlugin.php
2+
index 98c1cb41e4b0..c12ef88b9213 100644
3+
--- a/vendor/magento/module-company/Plugin/Checkout/Controller/Index/IndexPlugin.php
4+
+++ b/vendor/magento/module-company/Plugin/Checkout/Controller/Index/IndexPlugin.php
5+
@@ -38,14 +38,14 @@ class IndexPlugin
6+
private $request;
7+
8+
/**
9+
- * @var \Magento\Company\Api\AuthorizationInterface
10+
+ * @var \Magento\Company\Model\CompanyUserPermission
11+
*/
12+
- private $authorization;
13+
+ private $companyUserPermission;
14+
15+
/**
16+
- * @var \Magento\Company\Model\CompanyUserPermission
17+
+ * @var \Magento\Customer\Model\Session
18+
*/
19+
- private $companyUserPermission;
20+
+ private $customerSession;
21+
22+
/**
23+
* @param \Magento\Authorization\Model\UserContextInterface $userContext
24+
@@ -53,8 +53,8 @@ class IndexPlugin
25+
* @param \Magento\Company\Model\Customer\PermissionInterface $permission
26+
* @param \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory
27+
* @param \Magento\Framework\App\RequestInterface $request
28+
- * @param \Magento\Company\Api\AuthorizationInterface $authorization
29+
* @param \Magento\Company\Model\CompanyUserPermission $companyUserPermission
30+
+ * @param \Magento\Customer\Model\Session $customerSession
31+
*/
32+
public function __construct(
33+
\Magento\Authorization\Model\UserContextInterface $userContext,
34+
@@ -62,16 +62,16 @@ public function __construct(
35+
\Magento\Company\Model\Customer\PermissionInterface $permission,
36+
\Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory,
37+
\Magento\Framework\App\RequestInterface $request,
38+
- \Magento\Company\Api\AuthorizationInterface $authorization,
39+
- \Magento\Company\Model\CompanyUserPermission $companyUserPermission
40+
+ \Magento\Company\Model\CompanyUserPermission $companyUserPermission,
41+
+ \Magento\Customer\Model\Session $customerSession
42+
) {
43+
$this->userContext = $userContext;
44+
$this->customerRepository = $customerRepository;
45+
$this->permission = $permission;
46+
$this->resultRedirectFactory = $resultRedirectFactory;
47+
$this->request = $request;
48+
- $this->authorization = $authorization;
49+
$this->companyUserPermission = $companyUserPermission;
50+
+ $this->customerSession = $customerSession;
51+
}
52+
53+
/**
54+
@@ -90,6 +90,9 @@ public function aroundExecute(
55+
) {
56+
$customerId = $this->userContext->getUserId();
57+
if ($customerId) {
58+
+ if (!$this->customerSession->isLoggedIn()) {
59+
+ return $this->resultRedirectFactory->create()->setPath('customer/account/login');
60+
+ }
61+
$customer = $this->customerRepository->getById($customerId);
62+
$isNegotiableQuoteActive = (bool) $this->request->getParam('negotiableQuoteId');
63+
if (!$this->permission->isCheckoutAllowed($customer, $isNegotiableQuoteActive)) {

0 commit comments

Comments
 (0)