Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > All items show in menu even when roles are specified

Reply
Thread Tools

All items show in menu even when roles are specified

 
 
Chicagoboy27
Guest
Posts: n/a
 
      12-12-2006
I have all the following site map ...

<siteMapNode url="nothing.aspx" title="nothing" description="Home"
roles="">
<siteMapNode url="default.asp" title="Home" description="Home"
roles="" />
<siteMapNode url="test.aspx" title="test" description="test"
roles="test" />
<siteMapNode url="test2.aspx" title="test2" description="test"
roles="test2" />
</siteMapNode>


Both test and test2 show up on the menu when i log in with a user that
has only test as their role. The only way I can make test2 hide based
on role is using the following:


<siteMapNode url="nothing.aspx" title="nothing" description="Home"
roles="">
<siteMapNode url="default.asp" title="Home" description="Home"
roles="" />
<siteMapNode url="test.aspx" title="test1" description="test"
roles="test" />
<siteMapNode title="test2" description="test2">
<siteMapNode url="test2.aspx" title="test2"
description="test2"
roles="test2" />
</siteMapNode>

I am using securityTrimmingEnabled="true" in my web.config. I am not
sure how to make scenerio 1 work without having to add the extra node.

Thanks for your help in advance

 
Reply With Quote
 
 
 
 
Chicagoboy27
Guest
Posts: n/a
 
      12-12-2006
I think I was able to figure it out

added to web config
<location path="test2.aspx">
<system.web>
<authorization>
<allow users="test2" />
<deny users="*" />
</authorization>
</system.web>
</location>


Chicagoboy27 wrote:
> I have all the following site map ...
>
> <siteMapNode url="nothing.aspx" title="nothing" description="Home"
> roles="">
> <siteMapNode url="default.asp" title="Home" description="Home"
> roles="" />
> <siteMapNode url="test.aspx" title="test" description="test"
> roles="test" />
> <siteMapNode url="test2.aspx" title="test2" description="test"
> roles="test2" />
> </siteMapNode>
>
>
> Both test and test2 show up on the menu when i log in with a user that
> has only test as their role. The only way I can make test2 hide based
> on role is using the following:
>
>
> <siteMapNode url="nothing.aspx" title="nothing" description="Home"
> roles="">
> <siteMapNode url="default.asp" title="Home" description="Home"
> roles="" />
> <siteMapNode url="test.aspx" title="test1" description="test"
> roles="test" />
> <siteMapNode title="test2" description="test2">
> <siteMapNode url="test2.aspx" title="test2"
> description="test2"
> roles="test2" />
> </siteMapNode>
>
> I am using securityTrimmingEnabled="true" in my web.config. I am not
> sure how to make scenerio 1 work without having to add the extra node.
>
> Thanks for your help in advance


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Menu Items and Child Menu Items Larry Bud ASP .Net 13 01-07-2008 02:12 PM
Menu items and Roles Chuck P ASP .Net Web Controls 2 03-08-2007 09:00 AM
Iterating through all the menu/child items in a menu control Bryan ASP .Net 1 03-01-2006 09:38 AM
Hide Menu Items Based On Roles beaudetious ASP .Net Web Controls 3 01-09-2006 01:48 AM
pmw MenuBar: delete all menu items of a menu Tina Li Python 0 09-18-2003 09:57 PM



Advertisments