How is it possible to remove "Help" sub-menu from the Admin menu?
P.S. not by removing it from sitemap.config, but removing it just for certain customer roles.
Thanks a lot!
Hello kiriz,
By default, the only way to remove the sub-menu or menu items from the admin section is to comment out / remove the link from sitemap.config.
If you go to "Configuration > Access control list": you will see the permissions that you can give to other users based on roles but currently there is no role-based access for help menu. That's something that you will have to add it manually by doing a little bit of customization in the code by making is visible based on roles of logged in user help menu / sub - menu items are just the links not a page that requires permission.
If you go to "Configuration > Access control list": you will see the permissions that you can give to other users based on roles but currently there is no role-based access for help menu. That's something that you will have to add it manually by doing a little bit of customization in the code by making is visible based on roles of logged in user help menu / sub - menu items are just the links not a page that requires permission.
Could you help me with adding code manually as I am struggling to do it at the moment?
Ok, the best way (or cleanest way) to accomplish this is by adding Permission name so that you can manage this feature in your admin side also and you don't have to reply on change code every now and then.
In this example, I am going to assume that you want to hide the whole "Help" menu (you can do this for a specific sub-menu too):
1) In your sitemap, if you you observe other menus, you will see a a property "Permission Name" and if you compare other menus with Help menu, you will not see that property. Add this property in your help menu like this:
2) Now to to your nopCommerce database table and look for the table "Permission Record"
Add this as a new line / record:
Name: Admin area. Manage Help SystemName: ManageHelp Category: Configuration
3) Now restart your complete project again and login as admin. You will notice that you will not see "Help" menu. The reason is because you have added a new property and by default you are not allowed to see it. Go to Access Control List and you should see a new property "Manage Help": check that for your role "Administrator" and once you save it you will see the Help menu
That's all
Same way you can give control to other users based on roles from access control list.
P.S. Like I mentioned above, I gave example for whole HELP menu, you can add property to sub menus and manage sub menus accordingly.