Hot answers tagged

8

you need to create a plugin to disable the existing ACL record first In di.xml <!-- remove existing record from ACL --> <type name="Magento\Integration\Helper\Data"> <plugin name="my-acl-data" type="VendorName\ModuleName\Plugin\Integration\Data" sortOrder="100" /> </type> VendorName\ModuleName\Plugin\Integration\Data.php ...


3

You can check your code or follow below steps. you need create system.xml for both modules use same tab id for both sections use same/different section id for both groups use unique group id for two tabs app/code/vendor/ModuleA/etc/adminhtml/system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...


1

UPDATED I'd structure it like this Folder structure Then your admin links should be like this etc/adminhtml/menu.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <menu> <add id="Xigen::top_level" ...


1

The answer was that, despite already having a good key, because this was new functionality, it seemed to require re-authorizing my key (getting a new token).


1

Change this line, your module name is incorrect. <resource id="Pmage_Unit::unit" title="Pmage"> Update code <resource id="Pmage_Matrixprice::unit" title="Pmage"> Hope it helps.


1

I had the same problem with my custom plugin and solved it. So just want to share how I solved it if anyone gets the same issue. This was my error after logging in into admin dashboard: 1 exception(s): Exception #0 (LogicException): Could not create an acl object: The XML in file "/home/magento2/app/code/Mycustommodule/Mymodulejs/etc/acl.xml" is invalid: ...


1

Use Magento\Framework\Authorization\PolicyInterface Please find the example of usage at \Magento\Framework\Authorization::isAllowed $resourceString = "[Namespace]_[Module]::[resource]_[subresource]"; //example "Magento_Backend::admin" $roleId = $user->getAclRole(); return $this->aclPolicy->isAllowed($roleId, $resourceString);


Only top voted, non community-wiki answers of a minimum length are eligible