Magento 2 User Roles – Role Resource Tree Not Displaying

admin-usermagento2resourcessystem-configuser-roles

Magento 2.0.2 I am trying to add a new user role, but when I go to the Role Resource tab it doesn't display the Resources tree. I have no errors displaying. What is the next step to try and figure out why this isn't displaying.

Note : I loggedin as Administrator

Sreenshot :
enter image description here

Best Answer

After long research, I am able to resolve this problem. A mistake was in the format of XML .

Initial code :

<?xml version="1.0"?>
<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="Company_Module::" title="test" sortOrder="100"/>
        <!--AddMenuAcl-->
        </resource>
    </resources>
</acl>
</config>

Replace with :

<?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="Company_module::test" title="test module" sortOrder="100"/>
            <!--AddMenuAcl-->
        </resource>
    </resources>
</acl>
</config>

Check for this also:

 <?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_Adminhtml::admin">
        </resource>
    </resources>
</acl>

If no resource is defined please comment:

    <?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_Adminhtml::admin">
        </resource>-->
    </resources>
</acl>

Related Topic