Here is my problem. I have defined menu with one item and two submenu items. Note that first submenu item has defined same action method as his parent. I've also added AuthorizeAttribute on both actions methods Test1, Test2.
When user has no access to Test2 method then "Submenu item 2" is not rendered on UI which is ok. However when user has no access to Test1 method "Top menu item" and its children are not rendered. So the whole menu disappears.
I would like to have "Top menu item" rendered whenever user has access to any submenu item. Is it something doable with MVBSiteMapProvider?
mvc.sitemap file
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0" xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd">
<mvcSiteMapNode title="Home" controller="Home" action="Index" mainnav="false">
<mvcSiteMapNode title="Top menu item" controller="Test" action="Test1" >
<mvcSiteMapNode title="Submenu item 1" controller="Test" action="Test1" />
<mvcSiteMapNode title="Submenu item 2" controller="Test" action="Test2" />
</mvcSiteMapNode>
</mvcSiteMapNode>
Thanks for any help.