Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

web.sitemap in web config

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aa - 19 Jul 2005 07:40 GMT
VS2005 BETA2

in web.config it is written:

<location path="Gedimai/Ataskaitos">
   <system.web>
     <authorization>
       <allow roles="Dispeceriai,SDispeceriai,SVisi"/>
       <deny users="*"/>
     </authorization>
   </system.web>
 </location>

in web.sitemap it is:
<siteMapNode title="ATASKAITOS" roles="Dispeceriai,SDispeceriai,SVisi">
     <siteMapNode title="Dienos" roles="Dispeceriai,SDispeceriai,SVisi">
       <siteMapNode title="Gedimai" description="Dispeèeriø gedimai"
roles="Dispeceriai,SDispeceriai,SVisi">
         <siteMapNode
url="~/Gedimai/Ataskaitos/Gedimai1d.aspx?regions_id=0" title="RST"
roles="SVisi"/>
         <siteMapNode
url="~/Gedimai/Ataskaitos/Gedimai1d.aspx?regions_id=1" title="VET"
roles="SVisi,SDispeceriai"/>
         <siteMapNode
url="~/Gedimai/Ataskaitos/Gedimai1d.aspx?regions_id=2" title="PET"
roles="SVisi,SDispeceriai"/>
         <siteMapNode
url="~/Gedimai/Ataskaitos/Gedimai1d.aspx?regions_id=3" title="UET"
roles="SVisi,SDispeceriai"/>
    <siteMapNode url="~/Gedimai/Ataskaitos/Gedimai1d.aspx?regions_id=4"
title="AET" roles="SVisi,SDispeceriai"/>
   </siteMapNode>
  </siteMapNode>

when user is logging with "SDispeceriai" role, he can see all Site map
nodes, but I want that he could not  see node "RST", because it is for users
who have role "SVisi".
                   Thanks
Scott Allen - 19 Jul 2005 15:03 GMT
Did you configure the Xml SiteMapProvider with
enableSecurityTrimming="false" ?

--
Scott
http://www.OdeToCode.com/blogs/scott/

>VS2005 BETA2
>
[quoted text clipped - 35 lines]
>who have role "SVisi".
>                    Thanks
aa - 20 Jul 2005 07:03 GMT
when I am setting enableSecurityTrimming="false" then the user can see all
nodes, and I don't want that he saw all nodes. I want that he would see just
these, which he can see by his role

> Did you configure the Xml SiteMapProvider with
> enableSecurityTrimming="false" ?
[quoted text clipped - 43 lines]
>>who have role "SVisi".
>>                    Thanks
Brock Allen - 20 Jul 2005 14:13 GMT
I think you've mistaken the purpose of the roles attribute in the web.sitemap.
For a sitemap, when you have enabl;eSecurityTrimming=true it will hide all
the nodes that the user wouldn't normally have access to, as configured via
the <authorization> element in web.confing. The roles attribute in web.sitemap
doesn't restrict access. In fact, it's actually shows nodes that the user
normally wouldn't see. So, if <authorization> has hidden an element, but
you want to make it visible to that user, then add the roles attribute in
the sitemap.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> when I am setting enableSecurityTrimming="false" then the user can see
> all nodes, and I don't want that he saw all nodes. I want that he
[quoted text clipped - 47 lines]
>>> who have role "SVisi".
>>> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.