Skip to content

Commit 23a0d41

Browse files
committed
MAGETWO-94077: [2.3] Admin user with permissions for 1 website should not be able to view the All Store Views scope on a product
- Deny displaying 'Use default' option for locked attribute in UI
1 parent 50b1b43 commit 23a0d41

File tree

1 file changed

+5
-2
lines changed
  • app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier

1 file changed

+5
-2
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function __construct(
274274
}
275275

276276
/**
277-
* {@inheritdoc}
277+
* @inheritdoc
278278
* @since 101.0.0
279279
*/
280280
public function modifyMeta(array $meta)
@@ -385,7 +385,7 @@ public function getContainerChildren(ProductAttributeInterface $attribute, $grou
385385
}
386386

387387
/**
388-
* {@inheritdoc}
388+
* @inheritdoc
389389
* @since 101.0.0
390390
*/
391391
public function modifyData(array $data)
@@ -908,6 +908,9 @@ private function canDisplayUseDefault(ProductAttributeInterface $attribute)
908908
$attributeCode = $attribute->getAttributeCode();
909909
/** @var Product $product */
910910
$product = $this->locator->getProduct();
911+
if ($product->isLockedAttribute($attributeCode)) {
912+
return false;
913+
}
911914

912915
if (isset($this->canDisplayUseDefault[$attributeCode])) {
913916
return $this->canDisplayUseDefault[$attributeCode];

0 commit comments

Comments
 (0)