Skip to content

Commit 0379efb

Browse files
committed
MAGETWO-93990: 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 81d04af commit 0379efb

File tree

1 file changed

+3
-0
lines changed
  • app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,9 @@ private function canDisplayUseDefault(ProductAttributeInterface $attribute)
909909
$attributeCode = $attribute->getAttributeCode();
910910
/** @var Product $product */
911911
$product = $this->locator->getProduct();
912+
if ($product->isLockedAttribute($attributeCode)) {
913+
return false;
914+
}
912915

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

0 commit comments

Comments
 (0)