Solved

How to manage role/User rights with sitemap

Posted on 2006-11-28
3
596 Views
Last Modified: 2013-12-03
Hi experts

i would like to know how to manage role/user right in asp.net because in my actual website i create some role and rights like this :
(a folder is a folder in the root of my website)

role 1
  access folder 1 : Yes
  access folder 2 : Yes
  access folder 3 : No
role 2
  access folder 1 : Yes
  access folder 2 : No
  access folder 3 : No
role 3
  access folder 1 : No
  access folder 2 : No
  access folder 3 : Yes


and in each webpage i'm doing this :

  If User.IsInRole("Admin") Then
                mMenu.DataSource = ClsMisc.GetSiteMapDataSource("~/Navigation/SuperAdmin.sitemap", "~/UniquePageSuperAdmin.aspx")
            ElseIf User.IsInRole("Modérateur") Then
                mMenu.DataSource = ClsMisc.GetSiteMapDataSource("~/Navigation/Admin.sitemap", "~/UniquePageAdmin.aspx")
            End If


i have to test each role to bind the correcte sitemap for the current user
so if i have 300 roles... i don't think it's a good solution for managing role and/or user rights

Please HELP ME!!!

kind regards.
0
Comment
Question by:Dnx_7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Assisted Solution

by:sabeesh
sabeesh earned 150 total points
ID: 18026608
0
 
LVL 20

Accepted Solution

by:
brwwiggins earned 350 total points
ID: 18028284
You want to do a search on security trimming

http://aspnet.4guysfromrolla.com/articles/122805-1.aspx
0
 
LVL 2

Author Comment

by:Dnx_7
ID: 18029148
thanks to both of you

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question