The node should show only for users in the AdminCalendar role

  • Thread starter Thread starter Cal Who
  • Start date Start date
C

Cal Who

Below is part on my web.sitmap file.

What I wanted to happen is for the last node to show only for users in the
AdminCalendar role.

But it shows always.

How can I fix that?



<siteMapNode title="Home"

url="Home/Home.aspx"

description="Go to the The Home Page" >

....snip

<siteMapNode title="Calendar" roles="*"

description="Time an Location of events" >

<siteMapNode title="Monthly Calendars"

url="Calendar/EventsCalendar.aspx"

description="Calendar of events" />

....sniped more of the same...

<siteMapNode title="Locations List" roles="AdminCalendar"

url="Calendar/LocationsList.aspx"

description="Show a list of all locations" />

</siteMapNode>

....snip
 
Cal Who said:
Below is part on my web.sitmap file.

What I wanted to happen is for the last node to show only for users in the
AdminCalendar role.

But it shows always.

How can I fix that?



<siteMapNode title="Home"

url="Home/Home.aspx"

description="Go to the The Home Page" >

...snip

<siteMapNode title="Calendar" roles="*"

description="Time an Location of events" >

<siteMapNode title="Monthly Calendars"

url="Calendar/EventsCalendar.aspx"

description="Calendar of events" />

...sniped more of the same...

<siteMapNode title="Locations List" roles="AdminCalendar"

url="Calendar/LocationsList.aspx"

description="Show a list of all locations" />

</siteMapNode>

...snip
Did you set securityTimmingEnabled="true" in web.config?
If you did then I would go through the msdn Walkthrough:Filtering Sete-Map
Nodes Based on Security Roles
Go through it step by step and make sure you did each of them.
 
From my web.config file



<roleManager enabled="true"/>

<siteMap defaultProvider="XmlSiteMapProvider"

enabled="true">

<providers>

<add name="XmlSiteMapProvider"

description="SiteMap provider which reads in .sitemap XML files."

type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

siteMapFile="web.sitemap"

securityTrimmingEnabled="true"/>

</providers>

</siteMap>



A difference between me and the walk through is I have

System.Web, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a

but they do not.



Is that significant?

I see similar text on other "type" entries in the web.config file.

Would I be better off without them?



Thanks
 
I think your problem is that the admin content needs to be in a separate
folder that only admins are allowed access to via your web config.
 
I did that and it works

Thanks

Andy O'Neill said:
I think your problem is that the admin content needs to be in a separate
folder that only admins are allowed access to via your web config.
 
Back
Top