Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to manage role/User rights with sitemap

Posted on 2006-11-28
3
Medium Priority
?
605 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 600 total points
ID: 18026608
0
 
LVL 20

Accepted Solution

by:
brwwiggins earned 1400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

722 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