Skip to content

Commit

Permalink
MAGETWO-32668: [GITHUB] Change resource ids from Magento_Adminhtml::*…
Browse files Browse the repository at this point in the history
… to Magento_Backend #921

- Replaced Magento_Adminhtml with Magento_Backend
  • Loading branch information
anupdugar committed Feb 6, 2015
1 parent 518964e commit f16d24e
Show file tree
Hide file tree
Showing 111 changed files with 288 additions and 288 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getIdentity()
public function isDisplayed()
{
return $this->_authorization->isAllowed(
'Magento_Adminhtml::cache'
'Magento_Backend::cache'
) && count(
$this->_getCacheTypesForRefresh()
) > 0;
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdminNotification/etc/acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Adminhtml::admin">
<resource id="Magento_Adminhtml::system">
<resource id="Magento_Adminhtml::system_other_settings">
<resource id="Magento_Backend::admin">
<resource id="Magento_Backend::system">
<resource id="Magento_Backend::system_other_settings">
<resource id="Magento_AdminNotification::adminnotification" title="Notifications" sortOrder="10">
<resource id="Magento_AdminNotification::show_toolbar" title="Show Toolbar" sortOrder="10" />
<resource id="Magento_AdminNotification::show_list" title="Show List" sortOrder="20" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="adminhtml">
<module name="Magento_AdminNotification" before="Magento_Adminhtml" />
<module name="Magento_AdminNotification" before="Magento_Backend" />
</route>
</router>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
$this->createRules()->setData(
[
'role_id' => $admGroupRole->getId(),
'resource_id' => 'Magento_Adminhtml::all',
'resource_id' => 'Magento_Backend::all',
'privileges' => null,
'permission' => 'allow',
]
)->save();
} else {
/** @var \Magento\Authorization\Model\Rules $rule */
foreach ($rulesCollection as $rule) {
$rule->setData('resource_id', 'Magento_Adminhtml::all')->save();
$rule->setData('resource_id', 'Magento_Backend::all')->save();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
sort($modules);

foreach ($modules as $moduleName) {
if ($moduleName === 'Magento_Adminhtml' || $moduleName === 'Magento_Backend') {
if ($moduleName === 'Magento_Backend') {
continue;
}
$html .= $this->_getFieldHtml($element, $moduleName);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/System/Store/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Container
/**
* @var string
*/
protected $_blockGroup = 'Magento_Adminhtml';
protected $_blockGroup = 'Magento_Backend';

/**
* @return void
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Controller/Adminhtml/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ protected function _validateTypes(array $types)
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::cache');
return $this->_authorization->isAllowed('Magento_Backend::cache');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class Dashboard extends \Magento\Backend\App\Action
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::dashboard');
return $this->_authorization->isAllowed('Magento_Backend::dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function execute()
{
$items = [];

if (!$this->_authorization->isAllowed('Magento_Adminhtml::global_search')) {
if (!$this->_authorization->isAllowed('Magento_Backend::global_search')) {
$items[] = [
'id' => 'error',
'type' => __('Error'),
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Controller/Adminhtml/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class System extends AbstractAction
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::system');
return $this->_authorization->isAllowed('Magento_Backend::system');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
protected function _isAllowed()
{
$sectionId = $this->_request->getParam('section');
return $this->_authorization->isAllowed('Magento_Adminhtml::config')
return $this->_authorization->isAllowed('Magento_Backend::config')
|| $this->_configStructure->getElement($sectionId)->isAllowed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Account extends Action
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::myaccount');
return $this->_authorization->isAllowed('Magento_Backend::myaccount');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ public function __construct(
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::design');
return $this->_authorization->isAllowed('Magento_Backend::design');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Magento_Adminhtml::system');
$resultPage->setActiveMenu('Magento_Backend::system');
$resultPage->addBreadcrumb(__('System'), __('System'));
return $resultPage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function createPage()
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::store');
return $this->_authorization->isAllowed('Magento_Backend::store');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ protected function _initVariable()
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::variable');
return $this->_authorization->isAllowed('Magento_Backend::variable');
}
}
74 changes: 37 additions & 37 deletions app/code/Magento/Backend/etc/acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,51 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Adminhtml::all" title="Allow everything" sortOrder="10" />
<resource id="Magento_Adminhtml::admin" title="Magento Admin" sortOrder="20">
<resource id="Magento_Adminhtml::dashboard" title="Dashboard" sortOrder="0" />
<resource id="Magento_Adminhtml::global_search" title="Global Search" sortOrder="100" />
<resource id="Magento_Adminhtml::myaccount" title="My Account" sortOrder="50" />
<resource id="Magento_Adminhtml::marketing" title="Marketing" sortOrder="50">
<resource id="Magento_Adminhtml::marketing_seo" title="SEO &amp; Search" sortOrder="40" />
<resource id="Magento_Adminhtml::marketing_user_content" title="User Content" sortOrder="50" />
<resource id="Magento_Backend::all" title="Allow everything" sortOrder="10" />
<resource id="Magento_Backend::admin" title="Magento Admin" sortOrder="20">
<resource id="Magento_Backend::dashboard" title="Dashboard" sortOrder="0" />
<resource id="Magento_Backend::global_search" title="Global Search" sortOrder="100" />
<resource id="Magento_Backend::myaccount" title="My Account" sortOrder="50" />
<resource id="Magento_Backend::marketing" title="Marketing" sortOrder="50">
<resource id="Magento_Backend::marketing_seo" title="SEO &amp; Search" sortOrder="40" />
<resource id="Magento_Backend::marketing_user_content" title="User Content" sortOrder="50" />
</resource>
<resource id="Magento_Adminhtml::content" title="Content" sortOrder="60">
<resource id="Magento_Adminhtml::content_elements" title="Elements" sortOrder="10" />
<resource id="Magento_Adminhtml::design" title="Design" sortOrder="20">
<resource id="Magento_Adminhtml::schedule" title="Schedule" sortOrder="30" />
<resource id="Magento_Backend::content" title="Content" sortOrder="60">
<resource id="Magento_Backend::content_elements" title="Elements" sortOrder="10" />
<resource id="Magento_Backend::design" title="Design" sortOrder="20">
<resource id="Magento_Backend::schedule" title="Schedule" sortOrder="30" />
</resource>
</resource>
<resource id="Magento_Adminhtml::stores" title="Stores" sortOrder="80">
<resource id="Magento_Adminhtml::stores_settings" title="Settings" sortOrder="10">
<resource id="Magento_Adminhtml::store" title="All Stores" sortOrder="10"/>
<resource id="Magento_Adminhtml::config" title="Configuration" sortOrder="20">
<resource id="Magento_Adminhtml::advanced" title="Advanced Section" sortOrder="90" />
<resource id="Magento_Adminhtml::config_admin" title="Advanced Admin Section" sortOrder="100" />
<resource id="Magento_Adminhtml::config_design" title="Design Section" sortOrder="40" />
<resource id="Magento_Adminhtml::config_general" title="General Section" sortOrder="20" />
<resource id="Magento_Adminhtml::config_system" title="System Section" sortOrder="80" />
<resource id="Magento_Adminhtml::currency" title="Currency Setup Section" sortOrder="120" />
<resource id="Magento_Adminhtml::dev" title="Developer Section" sortOrder="110" />
<resource id="Magento_Adminhtml::web" title="Web Section" sortOrder="30" />
<resource id="Magento_Adminhtml::trans_email" title="Store Email Addresses Section" sortOrder="100" />
<resource id="Magento_Adminhtml::sendfriend" title="Email to a Friend" sortOrder="140" />
<resource id="Magento_Backend::stores" title="Stores" sortOrder="80">
<resource id="Magento_Backend::stores_settings" title="Settings" sortOrder="10">
<resource id="Magento_Backend::store" title="All Stores" sortOrder="10"/>
<resource id="Magento_Backend::config" title="Configuration" sortOrder="20">
<resource id="Magento_Backend::advanced" title="Advanced Section" sortOrder="90" />
<resource id="Magento_Backend::config_admin" title="Advanced Admin Section" sortOrder="100" />
<resource id="Magento_Backend::config_design" title="Design Section" sortOrder="40" />
<resource id="Magento_Backend::config_general" title="General Section" sortOrder="20" />
<resource id="Magento_Backend::config_system" title="System Section" sortOrder="80" />
<resource id="Magento_Backend::currency" title="Currency Setup Section" sortOrder="120" />
<resource id="Magento_Backend::dev" title="Developer Section" sortOrder="110" />
<resource id="Magento_Backend::web" title="Web Section" sortOrder="30" />
<resource id="Magento_Backend::trans_email" title="Store Email Addresses Section" sortOrder="100" />
<resource id="Magento_Backend::sendfriend" title="Email to a Friend" sortOrder="140" />
</resource>
</resource>
<resource id="Magento_Adminhtml::stores_attributes" title="Attributes" sortOrder="40" />
<resource id="Magento_Adminhtml::stores_other_settings" title="Other Settings" sortOrder="50" />
<resource id="Magento_Backend::stores_attributes" title="Attributes" sortOrder="40" />
<resource id="Magento_Backend::stores_other_settings" title="Other Settings" sortOrder="50" />
</resource>
<resource id="Magento_Adminhtml::system" title="System" sortOrder="90">
<resource id="Magento_Adminhtml::convert" title="Data Transfer" sortOrder="10" />
<resource id="Magento_Adminhtml::extensions" title="Magento Connect" sortOrder="20">
<resource id="Magento_Adminhtml::local" title="Connect Manager" sortOrder="10" />
<resource id="Magento_Adminhtml::custom" title="Package Extensions" sortOrder="20" />
<resource id="Magento_Backend::system" title="System" sortOrder="90">
<resource id="Magento_Backend::convert" title="Data Transfer" sortOrder="10" />
<resource id="Magento_Backend::extensions" title="Magento Connect" sortOrder="20">
<resource id="Magento_Backend::local" title="Connect Manager" sortOrder="10" />
<resource id="Magento_Backend::custom" title="Package Extensions" sortOrder="20" />
</resource>
<resource id="Magento_Adminhtml::tools" title="Tools" sortOrder="50">
<resource id="Magento_Adminhtml::cache" title="Cache Management" sortOrder="10" />
<resource id="Magento_Backend::tools" title="Tools" sortOrder="50">
<resource id="Magento_Backend::cache" title="Cache Management" sortOrder="10" />
</resource>
<resource id="Magento_Adminhtml::system_other_settings" title="Other Settings" sortOrder="80">
<resource id="Magento_Adminhtml::variable" title="Custom Variables" sortOrder="20" />
<resource id="Magento_Backend::system_other_settings" title="Other Settings" sortOrder="80">
<resource id="Magento_Backend::variable" title="Custom Variables" sortOrder="20" />
</resource>
</resource>
</resource>
Expand Down
Loading

0 comments on commit f16d24e

Please sign in to comment.