Skip to content

Commit 20cbf5a

Browse files
authored
Merge pull request #220 from magento-commerce/1.1.75-release
1.1.75 Release
2 parents 02a087e + beaa2f3 commit 20cbf5a

34 files changed

+2959
-3240
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.74",
5+
"version": "1.1.75",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches-info.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

patches/commerce/ACSD-59414_2.4.6-p5_v2.patch

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
diff --git a/vendor/magento/module-company/Controller/Account/CreatePost.php b/vendor/magento/module-company/Controller/Account/CreatePost.php
2+
index 98c9befe59bd..aac210f0642c 100644
3+
--- a/vendor/magento/module-company/Controller/Account/CreatePost.php
4+
+++ b/vendor/magento/module-company/Controller/Account/CreatePost.php
5+
@@ -25,7 +25,6 @@
6+
use Magento\Company\Model\CompanyUser;
7+
use Magento\Company\Model\Create\Session;
8+
use Magento\Company\Model\Customer\Company;
9+
-use Magento\Company\Model\Customer\IsSuperUser;
10+
use Magento\Customer\Api\AccountManagementInterface;
11+
use Magento\Customer\Api\CustomerRepositoryInterface;
12+
use Magento\Customer\Api\Data\CustomerInterface;
13+
@@ -43,6 +42,7 @@
14+
use Magento\Framework\Exception\NoSuchEntityException;
15+
use Magento\Company\Model\Customer\AccountManagement\CompanyRequestHydrator;
16+
use Psr\Log\LoggerInterface;
17+
+use Magento\Framework\App\Http\Context as HttpContext;
18+
19+
/**
20+
* Create company account action.
21+
@@ -118,9 +118,9 @@ class CreatePost extends Action implements HttpPostActionInterface
22+
private $customerRepository;
23+
24+
/**
25+
- * @var IsSuperUser
26+
+ * @var HttpContext
27+
*/
28+
- private $isSuperUser;
29+
+ private $httpContext;
30+
31+
/**
32+
* @var CompanyRequestHydrator
33+
@@ -141,8 +141,8 @@ class CreatePost extends Action implements HttpPostActionInterface
34+
* @param CustomerExtractor|null $customerExtractor
35+
* @param Company|null $customerCompany
36+
* @param CustomerRepositoryInterface|null $customerRepository
37+
- * @param IsSuperUser|null $isSuperUser
38+
* @param CompanyRequestHydrator|null $companyRequestHydrator
39+
+ * @param HttpContext|null $httpContext
40+
*/
41+
public function __construct(
42+
Context $context,
43+
@@ -158,8 +158,8 @@ public function __construct(
44+
?CustomerExtractor $customerExtractor = null,
45+
?Company $customerCompany = null,
46+
?CustomerRepositoryInterface $customerRepository = null,
47+
- ?IsSuperUser $isSuperUser = null,
48+
- ?CompanyRequestHydrator $companyRequestHydrator = null
49+
+ ?CompanyRequestHydrator $companyRequestHydrator = null,
50+
+ ?HttpContext $httpContext = null
51+
) {
52+
parent::__construct($context);
53+
$this->userContext = $userContext;
54+
@@ -178,10 +178,10 @@ public function __construct(
55+
?: ObjectManager::getInstance()->get(Company::class);
56+
$this->customerRepository = $customerRepository
57+
?: ObjectManager::getInstance()->get(CustomerRepositoryInterface::class);
58+
- $this->isSuperUser = $isSuperUser
59+
- ?: ObjectManager::getInstance()->get(IsSuperUser::class);
60+
$this->companyRequestHydrator = $companyRequestHydrator
61+
?: ObjectManager::getInstance()->get(CompanyRequestHydrator::class);
62+
+ $this->httpContext = $httpContext
63+
+ ?: ObjectManager::getInstance()->get(HttpContext::class);
64+
}
65+
66+
/**
67+
@@ -240,6 +240,8 @@ public function execute()
68+
*/
69+
private function createCompanyAndReturnSuperUser(CustomerInterface $customerData): CustomerInterface
70+
{
71+
+ $this->httpContext->unsValue(\Magento\Company\Model\CompanyContextInterface::CONTEXT_COMPANY_ID);
72+
+
73+
try {
74+
$customer = $this->customerRepository->get($customerData->getEmail());
75+
} catch (NoSuchEntityException $exception) {
76+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
diff --git a/vendor/magento/module-admin-gws/Plugin/ConfigurableProduct/Block/Adminhtml/Product/Steps/SelectAttributes.php b/vendor/magento/module-admin-gws/Plugin/ConfigurableProduct/Block/Adminhtml/Product/Steps/SelectAttributes.php
2+
new file mode 100644
3+
index 000000000000..11bd8c3934db
4+
--- /dev/null
5+
+++ b/vendor/magento/module-admin-gws/Plugin/ConfigurableProduct/Block/Adminhtml/Product/Steps/SelectAttributes.php
6+
@@ -0,0 +1,61 @@
7+
+<?php
8+
+/**
9+
+ * ADOBE CONFIDENTIAL
10+
+ *
11+
+ * Copyright 2025 Adobe
12+
+ * All Rights Reserved.
13+
+ *
14+
+ * NOTICE: All information contained herein is, and remains
15+
+ * the property of Adobe and its suppliers, if any. The intellectual
16+
+ * and technical concepts contained herein are proprietary to Adobe
17+
+ * and its suppliers and are protected by all applicable intellectual
18+
+ * property laws, including trade secret and copyright laws.
19+
+ * Dissemination of this information or reproduction of this material
20+
+ * is strictly forbidden unless prior written permission is obtained
21+
+ * from Adobe.
22+
+ */
23+
+declare(strict_types=1);
24+
+
25+
+namespace Magento\AdminGws\Plugin\ConfigurableProduct\Block\Adminhtml\Product\Steps;
26+
+
27+
+use Magento\AdminGws\Model\Role;
28+
+use Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\SelectAttributes as SelectAttributesBlock;
29+
+
30+
+/**
31+
+ * Check if certain admin is allowed to create new product attribute.
32+
+ */
33+
+class SelectAttributes
34+
+{
35+
+ /**
36+
+ * @var Role
37+
+ */
38+
+ private $role;
39+
+
40+
+ /**
41+
+ * @param Role $role
42+
+ */
43+
+ public function __construct(Role $role)
44+
+ {
45+
+ $this->role = $role;
46+
+ }
47+
+
48+
+ /**
49+
+ * Around plugin to determine if admin is allowed to create new product attribute.
50+
+ *
51+
+ * @param SelectAttributesBlock $subject
52+
+ * @param \Closure $proceed
53+
+ * @param string $dataProvider
54+
+ * @return string
55+
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
56+
+ */
57+
+ public function aroundGetAddNewAttributeButton(
58+
+ SelectAttributesBlock $subject,
59+
+ \Closure $proceed,
60+
+ $dataProvider = ''
61+
+ ): string {
62+
+ if (!$this->role->getIsAll()) {
63+
+ return '';
64+
+ }
65+
+ return $proceed($dataProvider);
66+
+ }
67+
+}
68+
diff --git a/vendor/magento/module-admin-gws/etc/adminhtml/di.xml b/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
69+
index 9075bc3b1c2c..bcf4f9b6373d 100644
70+
--- a/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
71+
+++ b/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
72+
@@ -122,4 +122,7 @@
73+
<type name="Magento\Store\Model\StoreSwitcher\ManageStoreCookie">
74+
<plugin name="store_switcher_manage_store_cookie_plugin" type="Magento\AdminGws\Model\Plugin\Store\StoreSwitcher\ManageStoreCookie"/>
75+
</type>
76+
+ <type name="Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\SelectAttributes">
77+
+ <plugin name="is_customer_allowed_to_create_new_attribute" type="Magento\AdminGws\Plugin\ConfigurableProduct\Block\Adminhtml\Product\Steps\SelectAttributes"/>
78+
+ </type>
79+
</config>
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
diff --git a/vendor/magento/module-catalog-permissions/Plugin/Wishlist/Block/Customer/ApplyWishlistItemsPermissions.php b/vendor/magento/module-catalog-permissions/Plugin/Wishlist/Block/Customer/ApplyWishlistItemsPermissions.php
2+
new file mode 100644
3+
index 000000000000..8921a9a79062
4+
--- /dev/null
5+
+++ b/vendor/magento/module-catalog-permissions/Plugin/Wishlist/Block/Customer/ApplyWishlistItemsPermissions.php
6+
@@ -0,0 +1,110 @@
7+
+<?php
8+
+/**
9+
+ * ADOBE CONFIDENTIAL
10+
+ *
11+
+ * Copyright 2025 Adobe
12+
+ * All Rights Reserved.
13+
+ *
14+
+ * NOTICE: All information contained herein is, and remains
15+
+ * the property of Adobe and its suppliers, if any. The intellectual
16+
+ * and technical concepts contained herein are proprietary to Adobe
17+
+ * and its suppliers and are protected by all applicable intellectual
18+
+ * property laws, including trade secret and copyright laws.
19+
+ * Dissemination of this information or reproduction of this material
20+
+ * is strictly forbidden unless prior written permission is obtained
21+
+ * from Adobe.
22+
+ */
23+
+declare(strict_types=1);
24+
+
25+
+namespace Magento\CatalogPermissions\Plugin\Wishlist\Block\Customer;
26+
+
27+
+use Magento\CatalogPermissions\Model\Indexer\TableMaintainer;
28+
+use Magento\CatalogPermissions\App\ConfigInterface;
29+
+use Magento\CatalogPermissions\Helper\Data as Helper;
30+
+use Magento\CatalogPermissions\Model\Permission;
31+
+use Magento\Customer\Model\Session;
32+
+use Magento\Framework\DB\Select;
33+
+use Magento\Framework\Exception\LocalizedException;
34+
+use Magento\Framework\Exception\NoSuchEntityException;
35+
+use Magento\Store\Model\StoreManagerInterface;
36+
+use Magento\Wishlist\Block\Customer\Wishlist;
37+
+use Magento\Wishlist\Model\ResourceModel\Item\Collection;
38+
+use Magento\CatalogPermissions\Model\ResourceModel\Permission as ResourcePermission;
39+
+
40+
+/**
41+
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
42+
+ */
43+
+class ApplyWishlistItemsPermissions
44+
+{
45+
+ /**
46+
+ * @param Session $customerSession
47+
+ * @param ConfigInterface $permissionsConfig
48+
+ * @param ResourcePermission $resource
49+
+ * @param StoreManagerInterface $storeManager
50+
+ * @param TableMaintainer $tableMaintainer
51+
+ * @param Helper $helper
52+
+ */
53+
+ public function __construct(
54+
+ private readonly Session $customerSession,
55+
+ private readonly ConfigInterface $permissionsConfig,
56+
+ private readonly ResourcePermission $resource,
57+
+ private readonly StoreManagerInterface $storeManager,
58+
+ private readonly TableMaintainer $tableMaintainer,
59+
+ private readonly Helper $helper
60+
+ ) {
61+
+ }
62+
+
63+
+ /**
64+
+ * Apply category permissions on wishlist item collection
65+
+ *
66+
+ * @param Wishlist $subject
67+
+ * @param Collection $result
68+
+ * @return Collection
69+
+ * @throws LocalizedException
70+
+ * @throws NoSuchEntityException
71+
+ * @throws \Zend_Db_Select_Exception
72+
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
73+
+ */
74+
+ public function afterGetWishlistItems(Wishlist $subject, Collection $result): Collection
75+
+ {
76+
+ if (!$this->permissionsConfig->isEnabled()) {
77+
+ return $result;
78+
+ }
79+
+ $customerGroupId = $this->customerSession->getCustomerGroupId();
80+
+ $connection = $this->resource->getConnection();
81+
+
82+
+ $fromPart = $result->getSelect()->getPart(Select::FROM);
83+
+
84+
+ $conditions[] = 'perm.product_id = main_table.product_id';
85+
+ $conditions[] = $connection->quoteInto('perm.store_id = ?', $this->storeManager->getStore()->getId());
86+
+ $conditions[] = $connection->quoteInto('perm.customer_group_id = ?', $customerGroupId);
87+
+ $joinConditions = join(' AND ', $conditions);
88+
+ $tableName = $this->tableMaintainer->resolveMainTableNameProduct($customerGroupId);
89+
+
90+
+ if (!isset($fromPart['perm'])) {
91+
+ $result->getSelect()->joinLeft(
92+
+ ['perm' => $tableName],
93+
+ $joinConditions,
94+
+ ['grant_catalog_category_view', 'grant_catalog_product_price', 'grant_checkout_items']
95+
+ );
96+
+ }
97+
+
98+
+ if (isset($fromPart['perm'])) {
99+
+ $fromPart['perm']['tableName'] = $tableName;
100+
+ $fromPart['perm']['joinCondition'] = $joinConditions;
101+
+ $result->getSelect()->setPart(Select::FROM, $fromPart);
102+
+ return $result;
103+
+ }
104+
+
105+
+ if (!$this->helper->isAllowedCategoryView()) {
106+
+ $result->getSelect()->where('perm.grant_catalog_category_view = ?', Permission::PERMISSION_ALLOW);
107+
+ } else {
108+
+ $result->getSelect()->where(
109+
+ 'perm.grant_catalog_category_view != ?' . ' OR perm.grant_catalog_category_view IS NULL',
110+
+ Permission::PERMISSION_DENY
111+
+ );
112+
+ }
113+
+
114+
+ return $result;
115+
+ }
116+
+}
117+
diff --git a/vendor/magento/module-catalog-permissions/etc/frontend/di.xml b/vendor/magento/module-catalog-permissions/etc/frontend/di.xml
118+
index 4d0c9657903c..ca4a73da4784 100644
119+
--- a/vendor/magento/module-catalog-permissions/etc/frontend/di.xml
120+
+++ b/vendor/magento/module-catalog-permissions/etc/frontend/di.xml
121+
@@ -17,4 +17,8 @@
122+
<plugin name="update_cache_plugin"
123+
type="Magento\CatalogPermissions\Plugin\UpdateCachePlugin" />
124+
</type>
125+
+ <type name="Magento\Wishlist\Block\Customer\Wishlist">
126+
+ <plugin name="wishlist_items_apply_category_permissions"
127+
+ type="Magento\CatalogPermissions\Plugin\Wishlist\Block\Customer\ApplyWishlistItemsPermissions" />
128+
+ </type>
129+
</config>
130+
diff --git a/vendor/magento/module-catalog-permissions/etc/graphql/events.xml b/vendor/magento/module-catalog-permissions/etc/graphql/events.xml
131+
new file mode 100644
132+
index 000000000000..c1605a6f688f
133+
--- /dev/null
134+
+++ b/vendor/magento/module-catalog-permissions/etc/graphql/events.xml
135+
@@ -0,0 +1,23 @@
136+
+<?xml version="1.0"?>
137+
+<!--
138+
+/**
139+
+ * ADOBE CONFIDENTIAL
140+
+ *
141+
+ * Copyright 2025 Adobe
142+
+ * All Rights Reserved.
143+
+ *
144+
+ * NOTICE: All information contained herein is, and remains
145+
+ * the property of Adobe and its suppliers, if any. The intellectual
146+
+ * and technical concepts contained herein are proprietary to Adobe
147+
+ * and its suppliers and are protected by all applicable intellectual
148+
+ * property laws, including trade secret and copyright laws.
149+
+ * Dissemination of this information or reproduction of this material
150+
+ * is strictly forbidden unless prior written permission is obtained
151+
+ * from Adobe.
152+
+ */
153+
+-->
154+
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
155+
+ <event name="catalog_product_collection_load_after">
156+
+ <observer name="magento_catalogpermissions" instance="Magento\CatalogPermissions\Observer\ApplyProductPermissionOnCollectionAfterLoadObserver"/>
157+
+ </event>
158+
+</config>
159+
diff --git a/vendor/magento/module-multiple-wishlist/Helper/Data.php b/vendor/magento/module-multiple-wishlist/Helper/Data.php
160+
index 9dcb51edf734..3611eceb794e 100644
161+
--- a/vendor/magento/module-multiple-wishlist/Helper/Data.php
162+
+++ b/vendor/magento/module-multiple-wishlist/Helper/Data.php
163+
@@ -242,7 +242,7 @@ public function getWishlistItemCount(Wishlist $wishlist)
164+
) {
165+
$count = $collection->getItemsQty();
166+
} else {
167+
- $count = $collection->getSize();
168+
+ $count = count($collection->getItems());
169+
}
170+
return $count;
171+
}

0 commit comments

Comments
 (0)