Skip to content

Commit 04c8c7b

Browse files
author
OlgaVasyltsun
committed
MAGETWO-98202: Additional Permissions for Design settings
1 parent c021b1c commit 04c8c7b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

app/code/Magento/Cms/Model/Page/DataProvider.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider
3535
*/
3636
private $authorization;
3737

38-
/**
39-
* @var array
40-
*/
41-
protected $designFieldSets = [
42-
'design',
43-
'custom_design_update',
44-
];
45-
4638
/**
4739
* @param string $name
4840
* @param string $primaryFieldName
@@ -117,7 +109,9 @@ public function getMeta()
117109

118110
if (!$this->authorization->isAllowed('Magento_Cms::save_design')) {
119111
$designMeta = [];
120-
foreach ($this->designFieldSets as $fieldSet) {
112+
$designFieldSets = ['design', 'custom_design_update'];
113+
114+
foreach ($designFieldSets as $fieldSet) {
121115
$designMeta[$fieldSet] = [
122116
'arguments' => [
123117
'data' => [
@@ -128,6 +122,7 @@ public function getMeta()
128122
],
129123
];
130124
}
125+
131126
$meta = array_merge_recursive($meta, $designMeta);
132127
}
133128

0 commit comments

Comments
 (0)