How to associate Magento admin menus with role resources

Here's the situation:

I would like to add a menu to the Magento navigation menu.
I accomplished this by adding the following code to app/etc/config.xml :

 <adminhtml> <menu> <example translate="title" module="adminhtml"> <title>Inventory</title> <sort_order>110</sort_order> <children> <set_time> <title>Set It!</title> <action>helloworld/index/goodbye</action> </set_time> </children> </example> </menu> 

The problem is that I cannot include this menu in the resolution-> role resources, so I cannot assign this to a specific user.

How to include this menu in permission resources -> roles?

Thanks and more energy!

+4
source share
2 answers

thanks .. I got it to work with several settings ..

 <adminhtml> <acl> <resources> <admin> <children> <helloworld_options translate="label" module="helloworld"> <title> MENU</title> <sort_order>999</sort_order> <children> <hello_children1> <title> RELATION</title> <sort_order>10</sort_order> </hello_children1> <hello_children2> <title> MACHINE</title> <sort_order>20</sort_order> </hello_children2> <hello_children3> <title> INVOICE</title> <sort_order>30</sort_order> </hello_children3> </children> </helloworld_options> <system> <children> <config> <children> <helloworld_options translate="label" module="helloworld"> <title> MENU</title> </helloworld_options> </children> </config> </children> </system> </children> </admin> </resources> </acl> </adminhtml> 

this will display the following menu with a submenu in the backend .. plus this can be configured in the resources of the role .. :)

+1
source

You need to tell magento that you want your new menu item to appear in the permission tree. To do this, you need to add the ACL section to your configuration data. Put this in your config.xml file of your module:

  <acl> <resources> <admin> <children> <example> <title>Inventory</title> <sort_order>110</sort_order> <children> <set_time> <title>Set It!</title> <sort_order>0</sort_order> </set_time> </children> </example> </children> </admin> </resources> </acl> 
+5
source

All Articles