Skip to content

Commit 2721f53

Browse files
committed
B2B-2404: Optimize Product Permissions in GraphQL resolver
1 parent 245d1d8 commit 2721f53

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

app/code/Magento/BundleGraphQl/Model/Resolver/Products/DataProvider/Product/Option/CollectionFactory.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
28
namespace Magento\BundleGraphQl\Model\Resolver\Products\DataProvider\Product\Option;
39

410
/**

app/code/Magento/Catalog/Model/ResourceModel/Product/CollectionFactory.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
28
namespace Magento\Catalog\Model\ResourceModel\Product;
39

410
/**
@@ -26,8 +32,10 @@ class CollectionFactory
2632
* @param \Magento\Framework\ObjectManagerInterface $objectManager
2733
* @param string $instanceName
2834
*/
29-
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = '\\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection')
30-
{
35+
public function __construct(
36+
\Magento\Framework\ObjectManagerInterface $objectManager,
37+
$instanceName = Magento\Catalog\Model\ResourceModel\Product\Collection::class
38+
) {
3139
$this->_objectManager = $objectManager;
3240
$this->_instanceName = $instanceName;
3341
}

0 commit comments

Comments
 (0)