0

I am running Magento CE 1.9.2.1 in my site which has many third-party modules installed having ton of admin menu items of their own.

Now I have created a sub-admin role, which is not as control-freak as Main admin role, but now I want to assign access to every third-party module I have installed, to the newly created "SubAdmin" role.

I have already provided the "acl" tags in my config.xml files of all third-party modules. Now I have to add following code to every adminhtml controller of every thirdparty module for making it accessible for every subadmin roles:

protected function _isAllowed() {
    return Mage::getSingleton('admin/session')->isAllowed('module/menualias');
}

Now I want to provide access to all modules from one Admin Observer file so I don't have to edit every controller of all modules. How can I do that or Can I even do that ?

0

check custom module > etc there are config.xml,system.xml is there. you also have to give permission from system>permission to your sub-admin.

also need have adminhtml.xml which contains bellow code and place it in custom module > etc.

<?xml version="1.0"?>
<config>
    <menu>
        <custom translate="title" module="news">
            <title>Custom</title>
            <sort_order>71</sort_order>
            <children>
                <news translate="title" module="news">
                    <title>Manage News</title>
                    <sort_order>0</sort_order>
                    <action>news/adminhtml_news</action>
                </news>
            </children>
        </custom>
    </menu>
    <acl>
            <resources>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <news translate="title" module="news">
                                            <title>Manage News</title>
                                            <sort_order>51</sort_order>
                                        </news>
                                    </children>                         
                                </config>
                            </children>
                        </system>
                        <custom translate="title" module="news">
                        <title>Custom Extention</title>
                        <sort_order>196</sort_order>
                        <children>
                            <news translate="title" module="news">
                                <title>Manage News</title>
                                <sort_order>0</sort_order>
                            </news>
                        </children>
                    </custom>
                    </children>
                </admin>
            </resources>
        </acl>
</config>

I hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.