468,309 Members | 1,274 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,309 developers. It's quick & easy.

cannot hide link in sitemap using roles= ...

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
Jun 19 '07 #1
0 1914

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Frank Bishop | last post: by
1 post views Thread by chris.rust | last post: by
reply views Thread by Jeevan | last post: by
reply views Thread by Demetri | last post: by
reply views Thread by rmgalante | last post: by
reply views Thread by Chris | last post: by
1 post views Thread by Seth Williams | last post: by
1 post views Thread by carlos | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.