Skip to content

Commit c28a878

Browse files
committed
MC-40777: Cannot save product in store view scope without Magento_Catalog::edit_product_design
1 parent 7962d85 commit c28a878

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/code/Magento/Catalog/Model/Product/Authorization.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ private function hasProductChanged(ProductModel $product, ?array $oldProduct = n
129129
//No new value
130130
continue;
131131
}
132-
if ($attribute->getBackendType() == 'datetime' && $newValue === null) {
133-
continue;
134-
}
135-
if (!in_array($newValue, $oldValues, true)) {
132+
if ($newValue !== null && !in_array($newValue, $oldValues, true)) {
136133
return true;
137134
}
138135
}

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function postRequestData(): array
8888
[
8989
'product' => [
9090
'name' => 'simple_new',
91-
'custom_design' => '',
92-
'page_layout' => '',
91+
'custom_design' => '3',
92+
'page_layout' => '1column',
9393
'options_container' => 'container2',
9494
'custom_layout_update' => '',
9595
'custom_design_from' => '2021-02-19 00:00:00',

0 commit comments

Comments
 (0)