cannot hide link in sitemap using roles= ...

C

Chris

Hi,

i have a problem with the visibility of my sitemap.
There is one role defined: "manager"
There are two users: 'user1' (member of role manager) and 'user2' (not
member).
The login.aspx redirects to a page with a menu control associated to a
SiteMapDataSource.

I want to hide pg1 for all non-members of role manager (=user2).

I did this in:

web.sitemap:
------------
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="page1.aspx" title="pg1" roles="manager" >
<siteMapNode url="page2.aspx" title="pg2" >
</siteMapNode>
<siteMapNode url="page3.aspx" title="pg3" >
</siteMapNode>
</siteMapNode>
</siteMap>

in web.config:
------------
<roleManager enabled="true" />

<siteMap defaultProvider="AspXmlSiteMapProvider" enabled="true">
<providers>
<clear/>
<add name="AspXmlSiteMapProvider"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>

My problem: when logging with any user, that user (user2) sees all the
pages, included pg1.

How to make pg1 invisible for user2 using this sitemap?
Thanks
Chris
 

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
474,056
Messages
2,570,440
Members
47,101
Latest member
DoloresHol

Latest Threads

Top