Posted about 10 years ago. Visible to the public.

Config ACL Definition

This should go in adminhtml.xml. Also see Config Menu Definition (note that the XML path of the menu entry needs to match up with the XML path of the ACL entry). To see how to implement the checking of an ACL within an admin controller see the _isAllowed() method in Boilerplate Admin Controller.

To place an entry under the sales node (alter the name for other nodes):

Copy
<adminhtml> <acl> <resources> <admin> <children> <sales> <children> <namespace_module translate="title" module="namespace_module"> <title>Your Module</title> <sort_order>100</sort_order> <!-- Children are optional --> <children> <this translate="title" module="namespace_module"> <title>This</title> <sort_order>10</sort_order> </this> <that translate="title" module="namespace_module"> <title>That</title> <sort_order>20</sort_order> </that> </children> </namespace_module> </children> </sales> </children> </admin> </resources> </acl> </adminhtml>

To place an entry on the top bar itself:

Copy
<adminhtml> <acl> <resources> <admin> <children> <namespace_module translate="title" module="namespace_module"> <title>Your Module</title> <sort_order>100</sort_order> <!-- Children are optional --> <children> <this translate="title" module="namespace_module"> <title>This</title> <sort_order>10</sort_order> </this> <that translate="title" module="namespace_module"> <title>That</title> <sort_order>20</sort_order> </that> </children> </namespace_module> </children> </admin> </resources> </acl> </adminhtml>

Owner of this card:

Avatar
Mike Whitby
Last edit:
almost 6 years ago
by Mike Whitby
Posted by Mike Whitby to Magento
This website uses short-lived cookies to improve usability.
Accept or learn more