0

I have inventory module which is a grid and is showing in admin panel this module is under catalog tab I created role inventory and this role should see just the module in etc folder config.xml I wrote the acl as follow:

 <acl>
    <resources>
        <all>
            <title>Allow Everything</title>
        </all>
        <admin>
            <children>
                <catalog>
        <children>
                <inventory>
                    <title>Inventory</title>
                           <children>
                                <inventory translate="inventory" module="inventory">
                                    <title>Lenmar US</title>
                                    <sort_order>0</sort_order>
                                </inventory>

                            </children>

                </inventory>
                </children>
                </catalog></children>
        </admin>
    </resources>
</acl>

more over in controller I have this for allow:

    class Lenmar_Inventory_Adminhtml_InventoryController extends Mage_Adminhtml_Controller_action
    {
    protected function _isAllowed()
        {
            return Mage::getSingleton('admin/session')->isAllowed('inventory/inventory');
        }       
//continued

in role resources I can see that the inventory is under the catalog and when I choose the inventory the catalog will be chosen but I have access denied when going to user with that role

1 Answer 1

1

Try using:

return Mage::getSingleton('admin/session')->isAllowed('catalog/inventory/inventory');

1
  • I don't know how to thank you enough! you're the Best! a real expert:)
    – Nickool
    Jul 22, 2014 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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