CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 11/14/2006 6:35:33 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 27 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
Nick Asiimwe
Asp.Net User
hiding menu options dynamically according to user roles11/14/2006 6:35:33 AM

0/0

Hi every one,

I have a site that is navigated with a treeview control. What iam trying to do is to hide menu options from the user if the he does not have access rights to that page. For example, i have these two roles, administrator and user. I would like users in the administrator role to only see menu nodes leading to report pages but not data entry pages and then users in the user role to see only menu nodes linking to data entry pages but not report pages.

I have added role attributes to my node tags in the sitemapfile and i quess iam supposed to add the code below to my web.config file but the code is bringing errors in my application during build.

sitemap defaultprovider="xmlsitemapprovider" enabled="true"></sitemap>

  <providers></providers>

  <clear/>

  <add name="xmlsitemapprovider"

       description="site map provider which reads in .sitemap xml files."

       type="system.web.xmlsitemapprovider, system.web,

       version=2.0.0.0, culture=neutral, publickeytoken=bo3f5f7f11d50a3a"

       sitemapFile="web.sitemap"

       securitytrimmingenabled="true" />

 

on debugging, the site alerts that there is an errror on line 20 below

 

Line 18:      providerName="System.Data.SqlClient" />
Line 19:   </connectionStrings>
Line 20:   <sitemap defaultprovider="xmlsitemapprovider" enabled="true"></sitemap>
Line 21:   <providers></providers>
Line 22:   <clear/>

Any help or an idea about an easier method of implementing this cool feature is welcome. Thanks.


--------------------------------------------------
No Project Too Eazy.
--------------------------------------------------
anas
Asp.Net User
Re: hiding menu options dynamically according to user roles11/14/2006 8:52:06 AM

0/0

follow  the link below ..

http://forums.asp.net/thread/1302094.aspx

 


Anas Ghanem My Blog


Nick Asiimwe
Asp.Net User
Re: hiding menu options dynamically according to user roles11/14/2006 12:57:27 PM

0/0

Man thanks very much, your link has saved me lots of hours and iam done.
--------------------------------------------------
No Project Too Eazy.
--------------------------------------------------
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Quick Base: The Missing Manual Authors: Nancy Conner, Pages: 400, Published: 2007
Oracle's Cooperative Development Environment: A Reference and User's Guide Authors: Kevin E. Kline, Pages: 366, Published: 1995
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
JD Edwards EnterpriseOne: The Complete Reference Authors: Allen Jacot, Joseph Miller, John Stern, Pages: 960, Published: 2008
The Concordance Database Manual Authors: M. Alan Haley, Pages: 368, Published: 2006
Dynamics AX: A Guide to Microsoft Axapta Authors: Luis X. B. Mourao, David Weiner, Pages: 469, Published: 2005
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
Practical Skills in Biology Authors: Allan Jones, Rob Reed, Jonathan Weyers, Pages: 496, Published: 2007
JavaScript: The Complete Reference Authors: Thomas A. Powell, Fritz Schneider, Pages: 948, Published: 2004

Web:
Making menu items visible/invisible according to user role ... But it is a solution for hiding menus based on role. .... show Navigation menu for admin only and show a site menu for anon users only. ...
Menu items according to user role Use Hide when functionality on the menu elements; i.e.: @IsNotMember("[ Administrator]";@UserRoles) It's as easy as that! ...
Hide Menu Items Based On Roles admin users to use. I'd like to learn how to hide this menu item when an ... the user's role setting by turning the SecurityTrimmingEnabled ...
Dynamically display Edit Control Block menu item in SharePoint ... I have seen several articles on modifying the Core.js file to hide items in the context ... dynamic menu item customization based on user role membership, ...
Hiding menu options through role-based controls | drupal.org Hiding menu options through role-based controls ... I do a basic check of the user's roles against a comma-separated list of roles, ...
Using Moodle: Hide Site Administration menu options It is possible to hide some of the Site Administration options for an specific role or user, we want to show just three options on the menu ...
Configuring Interface Display for a Role Note: Hiding the "Add" options from users does not limit their ability to add records. If you want to limit a role's power to add records, you must do so by ...
Scot's SharePoint Stuff: Hiding Individual Menu Items on ... Hi, Scot, thank for your quickly answer, actually I want is to hide menu item on the list item base on user role and values in special column, ...

Videos:
Fight Club-drawn on ms paint Every one please show ur mates and leave comments, i want some advice, critisism, jst tell me wut u thot this is an amazing video fo me drawing ...




Search This Site:










paypal features in commerce starter

how do you reference a master page outside of current application?

controller classes question for core

does a web application project requires anything beside msbuild to get compiled?

must master pages be built using server controls?

no login after deployment

master page and dropdownlist

dnn 2x where the heck is the database?!

is non-enabled sufficient for a captcha protected createuserwizard?

dnn3.0.5 users online module problem

macromedia dreamweaver mx and dnn

site crashing because of error with microsoft.web.ui.webcontrols

object reference not set to an instance of an object.

role problem

edit and continue...

help: flowing original caller to database (2 hops)

custom __dopostback()???

treeview event handlings

loading theme dynamically

opening projects of different languages

previewing a page before deleting from recycle bin

always have to login twice :(

webresource.axd

not understanding master page and content area issue - newbie question

too slow to download

recommended dotnetnuke hosts?

help please ....

make objects exist through round trips

hiding/removing dnn's control

viewing personal website and get the following error............

 
All Times Are GMT