Security Trimming not working 100% showing some nodes?!?

Discussion in 'ASP .Net' started by funstercinsolata, Jun 15, 2006.

  1. This is what i have:

    * web.config:
    <siteMap enabled="true" defaultProvider="smDefault">
    <providers>
    <add name="smDefault"
    type="System.Web.XmlSiteMapProvider"
    securityTrimmingEnabled="true"
    siteMapFile="Web.sitemap"/>
    </providers>
    </siteMap>

    * Web.sitemap:
    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="home.aspx" title="HOME" roles="*">
    <siteMapNode url="" title="DOCUMENTS" roles="admin, user">
    <siteMapNode url="dadd.aspx" title="ADD" description=""
    roles="admin"/>
    <siteMapNode url="dview.aspx" title="VIEW" description=""
    roles="admin, user"/>
    </siteMapNode>
    <siteMapNode url="" title="MANAGE USERS" roles="admin">
    <siteMapNode url="dadd.aspx" title="ADD" description=""
    roles="admin"/>
    </siteMapNode>
    </siteMapNode>
    </siteMap>
    <authorization>
    <allow users="*" />
    </authorization>

    *Master page
    <asp:Menu ID="Menu1" runat="server" DataSourceID="ds"
    EnableTheming="True" MaximumDynamicDisplayLevels="4"
    Orientation="Horizontal"/>
    <asp:SiteMapDataSource ID="ds" runat="server" ShowStartingNode="True"
    SiteMapProvider="smDefault" />

    »user« will see this:
    - HOME
    - DOCUMENTS
    - ADD ( he shouldn't see this!!!!!!!!!)
    - VIEW

    »admin« will see this:
    - HOME
    - DOCUMENTS
    - ADD
    - VIEW
    - MANAGE USERS
    - ADD


    So it does hide item MANAGE USERS but not item DOCUMENTS / ADD!!! Is
    this normal? Thanks in advance, Jo.
     
    funstercinsolata, Jun 15, 2006
    #1
    1. Advertisements

  2. What i found out is that IT DOES trim
    -- any nodes which have no url (submenus)

    and IT DOES NOT trim
    -- any nodes which have url specified.
     
    funstercinsolata, Jun 16, 2006
    #2
    1. Advertisements

  3. funstercinsolata, Jun 16, 2006
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.