473,785 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Menu Control, SiteMap, Security Trimming and Roles

Hi,

I've got my site configured to use a menu control, a site map, security
trimming, and roles. Everything seems to be working, except I have the
following problem.

If I define a hierarchical menu in my sitemap as follows:

<siteMap ...>
<siteMapNode url="" title="Main Menu" description="" roles="*">
<siteMapNode url="" title="Referenc e Tables" description=""
roles="Admins,P ower Users,Users">
<siteMapNode url="~/Admin/MaintainTable1. aspx" title="Table 1"
description="" roles="Admins, Power Users" />
<siteMapNode url="~/Admin/MaintainTable2. aspx" title="Table 2"
description="" roles="Users" />
</siteMapNode>
</siteMapNode>

.... removed

</siteMap>

All the items in the Reference Tables menu item are displayed,
regardless of the logged in user's role. I would expect the first menu
item to be displayed when an Admin or a Power User logs in, and the
second menu item to be displayed when a User logs in. Am I wrong?

Obviously, this is a simplified version of my site map. I can't
separate the site map nodes out and use the same url with different
node lists. I get an exception when I do this.

What am I doing wrong?

Jan 9 '07 #1
0 1745

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2684
by: Mark Parter | last post by:
I have a master page which contains a Menu control and a SiteMapPath control, both are bound to the same web.sitemap XML file. Say I have 2 pages, Page 1 and Page 2. Now Page 2 can only be accessed after selecting some information on Page 1 (using a CrossPagePostback). When the user get's to Page 2, the SiteMapPath control fails to render, obviously because Page 2 isn't in the web.sitemap file. If I put Page 2 in the web.sitemap file, it...
1
2012
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each connection, and is returning the correct roles, but... When we specify a role on the top sitemapnode that role seems to add to the roles on lower level nodes, so we end up needing to put roles="*" on the top node, but then regardless of which role we put...
0
964
by: M Hammett | last post by:
I have a site that uses a combination of Sitemap and XMLSiteMapProvider with RoleTrimming=true. It works great when secured for all roles defined for the user. Our site allows the user to run the site using only a single selected role rather than all roles defined for him/her. I can obtain the selected role but how can I tell the SiteMap provider to use only the privileges for the selected role? I have researched this but it does not...
4
1697
by: JJ | last post by:
This sounds easy but I'm going round in circles. I need to make a copy of the file to another xml file, omitting the nodes with a certain role. ??
1
1552
by: Kbalz | last post by:
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="*" ...
1
2360
by: S P | last post by:
Hi All, I am developing an ASP.NET 2.0 application. I want to show the menu, depending on the user role. How can I implement that? Currently I store all the menu details in XML file and using DataList to render link buttons in Tabular format.
5
15074
by: Tim Mackey | last post by:
hi, i have put my web.sitemap in /App_Data so i can edit it programatically via a web admin page, inheriting the modify permissions from the App_Data folder etc. i was hoping the provider would simply persist any changes i made, but it doesn't happen. e.g. selected.ParentNode.ChildNodes.Remove(selected); throws a NotSupportedException "Collection is read-only"
1
1563
by: Seth Williams | last post by:
Let's say I have an ASP.Net menu, with a datasourceID of a siteMapPath, which of course is based on a web.sitemap file Based on the person logged into the page, I have code in files in the App_Code folder which gets their job code, by which I need to let some people see some things (some root nodes and sometimes it's a sub node) and other people not see things. However, I don't know how to refer to the Menu Items in code As I...
4
6643
by: =?Utf-8?B?bmVlcmFqYkBub2lkYS5ub3NwYW1oY2x0ZWNoLmNv | last post by:
Hi, I have a question with respect to the security implementation of Menu using sitemap. Normally in the sitemap we can implement role based security but that is based on the Role based functionality provided by ASP.NET. Actually in our site we are using custom roles with our own role management and stuff. So is there a way to hide or show certain elements of the Sitemap in my menu based on the custom roles without using asp.net roles
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.