This project is read-only.

Hiding parts on meny based on permission

Topics: Administration
Jun 26, 2015 at 7:43 AM
In my Orchard site we have a few modules we've developed ourselves which should be accessible through the main navigational menu ("Main menu") under a first level "Back Office". Naturally, I only want "Back Office" and it's children to be accessible for members of role "Back office" but strangely enough, I can't seem to understand how to hide those menu entries for others. I've only been able to either hide the hole Main menu for users or nothing of it, but not just a few menu items. Please tell me how to do this, this is normally very simple in other CMS:es so I feel kind of stupid for not figuring it out :)

(The actual modules implement Orchard Authentication so a user without permissions can't actually run the modules, but it's kind of bad UI that they can still see them)
Jul 13, 2015 at 9:34 AM
There are multiple options for this:
  1. Create a new menu and add it to the authenticated layer
  2. To prevent adding menu items to two different menus, just add the Content Permissions part to the menu item content type. Checkout this post for which steps to take.