To add a custom tab to user roles

Step 1 :

We need to create an acl.xml in the etc folder of <vendorname><module name>.
write the following code in the acl.xml file.

<?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="HomePage_ImageUpload::imageupload" title="Customer Quotes" sortOrder="51">
                <resource id="HomePage_ImageUpload::all_images" title="All Quotes" sortOrder="10"/>
            </resource>
            <resource id="Magento_Backend::stores">
                <resource id="Magento_Backend::stores_settings">
                    <resource id="Magento_Config::config">
                        <resource id="Mageplaza_HelloWorld::helloworld_config" title="Hello World"/>
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>
</config>

step 2:  Check whether the vendor name is the same as in the menu.xml file.

step 3:  Flush Magento cache.

Leave a comment

Your email address will not be published. Required fields are marked *