Skip to content
Snippets Groups Projects
Commit 082e6a2d authored by arosliuk's avatar arosliuk
Browse files

Move ACL resources to const in SuggestedAttributeSets.php and SuggestedAttributes.php

parent 15d7ff1d
Branches
No related merge requests found
......@@ -8,6 +8,13 @@ namespace Magento\Catalog\Controller\Adminhtml\Product;
class SuggestAttributeSets extends \Magento\Backend\App\Action
{
/**
* Authorization level of a basic admin session
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'Magento_Catalog::sets';
/**
* @var \Magento\Framework\Controller\Result\JsonFactory
*/
......@@ -46,15 +53,5 @@ class SuggestAttributeSets extends \Magento\Backend\App\Action
);
return $resultJson;
}
/**
* Check for is allowed
*
* @return boolean
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Catalog::sets');
}
}
......@@ -8,6 +8,13 @@ namespace Magento\Catalog\Controller\Adminhtml\Product;
class SuggestAttributes extends \Magento\Backend\App\Action
{
/**
* Authorization level of a basic admin session
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'Magento_Catalog::attributes_attributes';
/**
* @var \Magento\Framework\Controller\Result\JsonFactory
*/
......@@ -20,6 +27,7 @@ class SuggestAttributes extends \Magento\Backend\App\Action
/**
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Catalog\Controller\Adminhtml\Product\Builder $productBuilder
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
*/
......@@ -48,15 +56,5 @@ class SuggestAttributes extends \Magento\Backend\App\Action
);
return $resultJson;
}
/**
* Check for is allowed
*
* @return boolean
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Catalog::attributes_attributes');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment