Hi,
I have web explorer bar in a user control and it has a data source of the Web.Sitemap file.
The web explorer bar works absolutely fine, but I am having problems displaying / hiding menus based on the user roles.
For e.g.: I have a menu item called "Users" and if that menu item does not have any rule in Web.Sitemap then it would appear in the web explorer bar, but as soon as I add some rule to it, the menu disappears. Please look at the code below.
<siteMapNode title="Users" rule="ShowAppAdminUI"> <siteMapNode title="Manage User Roles" description="Manage User Roles" url="~/User/ListUsers.aspx" rule="ShowAppAdminUI" /></siteMapNode>
I have made sure that I belong to the roles that are defined in the rule "ShowAppAdminUI".
Can someone please help?
Thanks.
SecurityTrimming is an ASP.NET feature. You can read more about it here:
http://blogs.msdn.com/b/dannychen/archive/2006/03/16/553005.aspx
Hope that helps.
Thanks,
Lubomir
Found a solution to the problem mentioned above.
On page_load event, I added the following line:
webexFirmStructure.Attributes.Add("securityTrimmingEnabled", "true");
This seems to work absolutely fine, but I was just wondering should I be able to see this property in "Property Explorer" of the web explorer bar control?