Content Menu Item Navigation Menu Display Issues
description
I have been working with the Content Menu Item Navigation and am having trouble getting it to function properly when the roles are used to restrict a user's access to certain content types. From everything I can tell, the issue is that a "Content Menu Item Part" has it's own Content Id and does not utilize the Content Id of the associated Content it is related to. This being the case, the security that is being checked in the "Orchard.UI.Navigation.NavigationManager.cs" line 97 is checking authorization permissions for the Content Item representing the Content Menu Item part and NOT the associated content (e.g. a page, a projection). As such, there is no way to properly restrict access to roles and use the "Content Menu Item" type in Navigation since all "Content Menu Item" menus will not be displayed.
One solution I was considering is to expand the "NavigationManager.cs" on line 97 to see if the content was a Content Menu Item, and, if it was, then I would grab the Content that is being referenced by the ContentMenuItemPart. However, in order to do this I would need to add a reference to Orchard.Core and that doesn't make good sense to have Orchard.Framework dependent on Orchard.Core (as it is not already and structurally does not seem it should be). Hopefully you can provide another alternative.