Sitemap & roles

E

elziko

I want to allow only one role access to one of my items in my sitemap.

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode>
<siteMapNode url="~/Default.aspx" title="Home" description="Home
Page"/>
<siteMapNode url="~/Items.aspx" title="Consultancy"
description="Items">
<siteMapNode url="~/ItemDetail.aspx" title="Item"
description="Item"/>
</siteMapNode>
<siteMapNode url="~/Downloads.aspx" title="Downloads"
description="Downloads" roles="*"/>
<siteMapNode url="~/People.aspx" title="People" description="About
Our People"/>
<siteMapNode url="~/News.aspx" title="News" description="News About
The Business"/>
<siteMapNode url="~/About.aspx" title="About" description="Business
Overview"/>
<siteMapNode url="~/Contact.aspx" title="Contact"
description="Contact Information"/>
<siteMapNode url="~/Recruitment.aspx" title="Recruitment"
description="Information for..."/>
<siteMapNode url="~/Admin.aspx" title="Admin" description="Admin
tools" roles="Admin" />
</siteMapNode>
</siteMap>

In this case I want all roles to see all items except for the Admin item -
this should only be available to the admin role.

However, this gives me no items on the sitemap at all. If I change the third
line to:

<siteMapNode roles="*">

then all roles can see all items including the Admin one. How would I go
about locking out non-admin users from the Admin item using my sitemap
whilst allowing all roles to see every other item?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top