Confused on Menu Security Trimming

K

Kbalz

I'm using xml site map to trim my security on my menus.. Its working
rather well, but I'm having this gripe about it.. Here's my psuedo
problem..

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Home Secure Software Login
Sitemap" roles="*">
<siteMapNode title="Home" roles="*" url="~/default.aspx">
<siteMapNode title="Logon" roles="*" url="~/logon/default.aspx"
/>
<siteMapNode title="Software"
roles="admin,LicAdmin,CustomerQualified" url="~/software/default.aspx"
/>
</siteMapNode>
</siteMapNode>
</sitemap>

A very watered down version of my site map.. I choose to hide the first
node, so the menu looks like

Home ---
|
| ----- Logon
| ----- Software

So I want all users to see Home and Logon.. but only CustomerQualified
to see Software.. however the software node seems to be inheriting the
"*" from the Home node..

===========================================
With this sitemap, I get what I want.... almost,

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Home Secure Software Login
Sitemap" roles="*">
<siteMapNode title="Home" roles="*" url="~/default.aspx">
<siteMapNode title="Logon" roles="*" url="~/logon/default.aspx"
/>
<siteMapNode title="Software
roles="admin,LicAdmin,CustomerQualified">
<siteMapNode title="Software download"
roles="admin,LicAdmin,CustomerQualified" url="~/software/default.aspx"
/>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</sitemap>


This makes my menu look as such:

Home ---
|
| ----- Logon
| ----- Software ---
|
| ----- Software Downloads

But now the Software node is not shown to "*", but only the roles I
specify.. Perhaps because it has a child of its own
(SoftwareDownloads)..? Why is it acting like this, and is there any way
I can get the first sitemap to trim bottom-level child nodes different
than nodes on the same level..?
 

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
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top