Magento 1.9 – Custom Module Menus Not Showing in Another User Account

adminmagento-1.9moduleresourcesuser-roles

My custom module is not showing its menus in another user role account.

Here is the adminhtml.xml

<?xml version="1.0"?>
<config>
    <menu>
        <kartparadigm_storecredit module="kartparadigm_storecredit">
            <title>Store Credit</title>
            <sort_order>71</sort_order>
            <children>
                <settings module="kartparadigm_storecredit">
                    <title>Settings</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/settings</action>
                </settings>
                <customers module="kartparadigm_storecredit">
                    <title>Manage Customer Credits</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/customer</action>
                </customers>
                <transactions module="kartparadigm_storecredit">
                    <title>Manage Transactions</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/index</action>
                </transactions>
            </children>
        </kartparadigm_storecredit>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <storecredit translate="title" module="kartparadigm_storecredit">
                        <title>Credits</title>
                        <sort_order>300</sort_order>
                        <children>
                           <transactions translate="title" module="kartparadigm_storecredit">
                             <title>Manage Transaction</title>
                             <sort_order>1</sort_order>
                           </transactions>
                           <customers translate="title" module="kartparadigm_storecredit">
                              <title>Manage Customer Credits</title>
                              <sort_order>2</sort_order>
                           </customers>
                           <settings translate="title" module="kartparadigm_storecredit">
                                <title>Settings</title>
                                <sort_order>3</sort_order>
                           </settings>
                        </children>
                     </storecredit>
                     <system>
                        <children>
                            <config>
                                <children>
                                    <mycustom_section translate="title" module="kartparadigm_storecredit">
                                        <title>My Custom Section</title>
                                        <sort_order>100</sort_order>
                                    </mycustom_section>
                                </children>
                            </config>
                        </children>
                     </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>

I have also used this code in controller–

protected function _isAllowed()
{
        return true;
}

Although it is showing in Role Resources as below image–

enter image description here

But when I login with different account it does not show menus.
I can't find out where is the problem. can anyone help me ?

Best Answer

add menu in ACL

<?xml version="1.0"?>
<config>
    <menu>
        <kartparadigm_storecredit module="kartparadigm_storecredit">
            <title>Store Credit</title>
            <sort_order>71</sort_order>
            <children>
                <settings module="kartparadigm_storecredit">
                    <title>Settings</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/settings</action>
                </settings>
                <customers module="kartparadigm_storecredit">
                    <title>Manage Customer Credits</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/customer</action>
                </customers>
                <transactions module="kartparadigm_storecredit">
                    <title>Manage Transactions</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/index</action>
                </transactions>
            </children>
        </kartparadigm_storecredit>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>

                     <system>
                        <children>
                            <config>
                                <children>
                                    <mycustom_section translate="title" module="kartparadigm_storecredit">
                                        <title>My Custom Section</title>
                                        <sort_order>100</sort_order>
                                    </mycustom_section>
                                </children>
                            </config>
                        </children>
                     </system>
                     <kartparadigm_storecredit module="kartparadigm_storecredit">
            <title>Store Credit</title>
            <sort_order>71</sort_order>
            <children>
                <settings module="kartparadigm_storecredit">
                    <title>Settings</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/settings</action>
                </settings>
                <customers module="kartparadigm_storecredit">
                    <title>Manage Customer Credits</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/customer</action>
                </customers>
                <transactions module="kartparadigm_storecredit">
                    <title>Manage Transactions</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/credits/index</action>
                </transactions>
            </children>
        </kartparadigm_storecredit>
                </children>
            </admin>
        </resources>
    </acl>
</config>
Related Topic