RyanAndres
asked on
ASP.NET Menu Control (Security Trimming)
Here I am using the ASP.NET Menu control with Security Trimming enabled to show/hide nodes to users to certain roles.
There are 2 roles: administrator and projectdirectors.
The problem is that for the "Print Checks" node, it is appearing for users in the projectdirectors role when clearly it is assigned the administrator role.
It is weird because it works for the Reports node and will hide the "By Date" node to projectdirectors.
I don't know if this is relevant but the /Checks/ and /Reports/ urls are using ASP.NET routing.
I am using C# with .NET 3.5 SP1.
Any ideas?
There are 2 roles: administrator and projectdirectors.
The problem is that for the "Print Checks" node, it is appearing for users in the projectdirectors role when clearly it is assigned the administrator role.
It is weird because it works for the Reports node and will hide the "By Date" node to projectdirectors.
I don't know if this is relevant but the /Checks/ and /Reports/ urls are using ASP.NET routing.
I am using C# with .NET 3.5 SP1.
Any ideas?
Web.sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode url="~/Default.aspx" title="Home">
<siteMapNode title="Reports" roles="*">
<siteMapNode url="~/Reports/View/ByDate" title="By Date" roles="administrator" />
<siteMapNode url="~/Reports/View/ByStudy" title="By Study" roles="projectdirectors" />
</siteMapNode>
<siteMapNode title="Checks" roles="*">
<siteMapNode url="~/Checks/View" title="View Checks" roles="*" />
<siteMapNode url="~/Checks/Print" title="Print Checks" roles="administrator" />
<siteMapNode url="~/InvalidChecks.aspx" title="Invalid Checks" roles="administrator" />
</siteMapNode>
<siteMapNode title="User" roles="*">
<siteMapNode url="~/User/Profile.aspx" title="Profile" />
<siteMapNode url="~/User/ChangePassword.aspx" title="Change Password" />
</siteMapNode>
<siteMapNode title="Admin" roles="administrator">
<siteMapNode url="~/Admin/AddUser.aspx" title="Add User" roles="administrator" />
<siteMapNode url="~/Admin/ViewUsers.aspx" title="View Users" roles="administrator" />
</siteMapNode>
</siteMapNode>
</siteMap>
menu.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window