Hi,
I want to create an ACL Resource for custom customer attribute. I didn't found anything relevant with this..
Please help me with this.
Thank you in Advance
Karuna Khatri
Hello,
If you want to create the custom module ACL: Create file in your module at : app/code/Vendor/Module/etc/acl.xml
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Backend::admin"> <resource id="Vendor_Module::save" title="Module" sortOrder="10" > <resource id="Vendor_Module::module" title="Module" sortOrder="0" /> </resource> </resource> </resources> </acl> </config>
Note: Please make sure to add comman resource id in your admin Controller:
protected function _isAllowed() { return $this->_authorization->isAllowed('Vendor_Module::save'); }
This will create a New Permissions in admin=> System =>Roles/Permission section.
For more information refer this link https://www.generacodice.com/en/articolo/3266830/how-to-create-acl-for-customer-user-in-magento-2
Happy coding
Hello @karuna_khatri,
please visit Magento Devdocs, you will find the solution over there.
Thanks & Regards