File tree 10 files changed +57
-6
lines changed
Cms/Controller/Adminhtml/Wysiwyg/Images
10 files changed +57
-6
lines changed Original file line number Diff line number Diff line change 13
13
*/
14
14
class DeleteFiles extends \Magento \Cms \Controller \Adminhtml \Wysiwyg \Images implements HttpPostActionInterface
15
15
{
16
+ /**
17
+ * @see _isAllowed()
18
+ */
19
+ public const ADMIN_RESOURCE = 'Magento_Cms::delete_assets ' ;
20
+
16
21
/**
17
22
* @var \Magento\Framework\Controller\Result\JsonFactory
18
23
*/
Original file line number Diff line number Diff line change 17
17
*/
18
18
class DeleteFolder extends \Magento \Cms \Controller \Adminhtml \Wysiwyg \Images implements HttpPostActionInterface
19
19
{
20
+ /**
21
+ * @see _isAllowed()
22
+ */
23
+ public const ADMIN_RESOURCE = 'Magento_Cms::delete_folder ' ;
24
+
20
25
/**
21
26
* @var \Magento\Framework\Controller\Result\JsonFactory
22
27
*/
Original file line number Diff line number Diff line change 14
14
*/
15
15
class NewFolder extends \Magento \Cms \Controller \Adminhtml \Wysiwyg \Images implements HttpPostActionInterface
16
16
{
17
+ /**
18
+ * @see _isAllowed()
19
+ */
20
+ public const ADMIN_RESOURCE = 'Magento_Cms::create_folder ' ;
21
+
17
22
/**
18
23
* @var \Magento\Framework\Controller\Result\JsonFactory
19
24
*/
@@ -65,7 +70,7 @@ public function execute()
65
70
}
66
71
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
67
72
$ resultJson = $ this ->resultJsonFactory ->create ();
68
-
73
+
69
74
return $ resultJson ->setData ($ result );
70
75
}
71
76
}
Original file line number Diff line number Diff line change 8
8
9
9
class OnInsert extends \Magento \Cms \Controller \Adminhtml \Wysiwyg \Images
10
10
{
11
+ /**
12
+ * @see _isAllowed()
13
+ */
14
+ public const ADMIN_RESOURCE = 'Magento_Cms::insert_assets ' ;
15
+
11
16
/**
12
17
* @var \Magento\Framework\Controller\Result\RawFactory
13
18
*/
Original file line number Diff line number Diff line change 17
17
*/
18
18
class Upload extends \Magento \Cms \Controller \Adminhtml \Wysiwyg \Images implements HttpPostActionInterface
19
19
{
20
+ /**
21
+ * @see _isAllowed()
22
+ */
23
+ public const ADMIN_RESOURCE = 'Magento_Cms::upload_assets ' ;
24
+
20
25
/**
21
26
* @var \Magento\Framework\Controller\Result\JsonFactory
22
27
*/
@@ -74,7 +79,7 @@ public function execute()
74
79
}
75
80
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
76
81
$ resultJson = $ this ->resultJsonFactory ->create ();
77
-
82
+
78
83
return $ resultJson ->setData ($ response );
79
84
}
80
85
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class Create extends Action implements HttpPostActionInterface
29
29
/**
30
30
* @see _isAllowed()
31
31
*/
32
- public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery ' ;
32
+ public const ADMIN_RESOURCE = 'Magento_Cms::create_folder ' ;
33
33
34
34
/**
35
35
* @var CreateDirectoriesByPathsInterface
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class Delete extends Action implements HttpPostActionInterface
30
30
/**
31
31
* @see _isAllowed()
32
32
*/
33
- public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery ' ;
33
+ public const ADMIN_RESOURCE = 'Magento_Cms::delete_folder ' ;
34
34
35
35
/**
36
36
* @var DeleteAssetsByPathsInterface
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class Delete extends Action implements HttpPostActionInterface
31
31
/**
32
32
* @see _isAllowed()
33
33
*/
34
- public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery ' ;
34
+ public const ADMIN_RESOURCE = 'Magento_Cms::delete_assets ' ;
35
35
36
36
/**
37
37
* @var DeleteImage
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class Upload extends Action implements HttpPostActionInterface
28
28
/**
29
29
* @see _isAllowed()
30
30
*/
31
- public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery ' ;
31
+ public const ADMIN_RESOURCE = 'Magento_Cms::upload_assets ' ;
32
32
33
33
/**
34
34
* @var UploadImage
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © Magento, Inc. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Acl/etc/acl.xsd" >
9
+ <acl >
10
+ <resources >
11
+ <resource id =" Magento_Backend::admin" >
12
+ <resource id =" Magento_Backend::content" >
13
+ <resource id =" Magento_Backend::content_elements" >
14
+ <resource id =" Magento_Cms::media_gallery" >
15
+ <resource id =" Magento_Cms::upload_assets" title =" Upload Assets" translate =" title" sortOrder =" 70" />
16
+ <resource id =" Magento_Cms::delete_assets" title =" Delete Assets" translate =" title" sortOrder =" 60" />
17
+ <resource id =" Magento_Cms::insert_assets" title =" Insert Assets into the content" translate =" title" sortOrder =" 50" />
18
+ <resource id =" Magento_Cms::create_folder" title =" Create Folder" translate =" title" sortOrder =" 40" />
19
+ <resource id =" Magento_Cms::delete_folder" title =" Delete Folder" translate =" title" sortOrder =" 40" />
20
+ </resource >
21
+ </resource >
22
+ </resource >
23
+ </resource >
24
+ </resources >
25
+ </acl >
26
+ </config >
You can’t perform that action at this time.
0 commit comments