File tree Expand file tree Collapse file tree 3 files changed +30
-5
lines changed
app/code/Magento/Analytics
Controller/Adminhtml/Subscription Expand file tree Collapse file tree 3 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 66
77namespace Magento \Analytics \Controller \Adminhtml \Subscription ;
88
9-
109use Magento \Analytics \Model \Subscription ;
11- use Magento \Framework \App \ Action \Action ;
10+ use Magento \Backend \App \Action ;
1211use Magento \Backend \App \Action \Context ;
1312use Magento \Framework \Controller \Result \Json ;
1413use Magento \Framework \Controller \ResultFactory ;
@@ -44,6 +43,16 @@ public function __construct(
4443 parent ::__construct ($ context );
4544 }
4645
46+ /**
47+ * Check admin permissions for this controller
48+ *
49+ * @return boolean
50+ */
51+ protected function _isAllowed ()
52+ {
53+ return $ this ->_authorization ->isAllowed ('Magento_Analytics::analytics ' );
54+ }
55+
4756 /**
4857 * Activate subscription to Magento Analytics via AJAX.
4958 *
Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © 2016 Magento. All rights reserved.
3+ * Copyright © 2017 Magento. All rights reserved.
44 * See COPYING.txt for license details.
55 */
66
77namespace Magento \Analytics \Controller \Adminhtml \Subscription ;
88
9-
109use Magento \Analytics \Model \NotificationTime ;
11- use Magento \Framework \App \ Action \Action ;
10+ use Magento \Backend \App \Action ;
1211use Magento \Backend \App \Action \Context ;
1312use Magento \Framework \Intl \DateTimeFactory ;
1413use Magento \Framework \Controller \Result \Json ;
@@ -57,6 +56,16 @@ public function __construct(
5756
5857 }
5958
59+ /**
60+ * Check admin permissions for this controller
61+ *
62+ * @return boolean
63+ */
64+ protected function _isAllowed ()
65+ {
66+ return $ this ->_authorization ->isAllowed ('Magento_Analytics::analytics ' );
67+ }
68+
6069 /**
6170 * Postpones notification about subscription
6271 *
Original file line number Diff line number Diff line change 1212 <resource id =" Magento_Analytics::analytics" title =" Analytics" translate =" title" sortOrder =" 10" >
1313 <resource id =" Magento_Analytics::analytics_api" title =" API" translate =" title" sortOrder =" 10" />
1414 </resource >
15+ <resource id =" Magento_Backend::stores" >
16+ <resource id =" Magento_Backend::stores_settings" >
17+ <resource id =" Magento_Config::config" title =" Configuration" translate =" title" sortOrder =" 20" >
18+ <resource id =" Magento_Config::analytics" title =" Analytics" translate =" title" sortOrder =" 150" />
19+ </resource >
20+ </resource >
21+ </resource >
1522 </resource >
1623 </resources >
1724 </acl >
You can’t perform that action at this time.
0 commit comments