I am trying to create a sitemap menu based on roles but when I add all the roles to the root menu and then just individual roles to the individual menu items, I always get everything within the menu.
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="Menu" description="" roles="Role1;Role2;Role3">
<siteMapNode url="~/page1.aspx" title="" description="" roles="Role1;Role2;Role3">
</siteMapNode>
<siteMapNode url="~/page2.aspx" title="" description="" roles="Role2; Role3">
</siteMapNode>
<siteMapNode url="~/page3.aspx" title="" description="" roles="Role3">
</siteMapNode>
</siteMapNode>
</siteMap>
For as per above, Roles 1,2,3 can see the root menu. I am part of Role1 therefore I should only be allowed to see page1.aspx but instead I can see all three.
How to fix that?
The menu is to be shown like so:
Page1 | Page2 | Page3
so if I am only in Role1 I should see:
Page 1 |