Security :: Lock Down Certain Sitemap Menu Items Based On The Users Role ?
Jan 21, 2010
My web app has 3roles, I need to lock down certain sitemap menu items based on the users role and what I'm using isn't working.
my roles are Supervisor, manager, and User.
[Code]....
I only want those roles to see those menu options, I do not want someone with a user role to see those options at all. Currently if I log into my site with a user role, I'm seeing everything on the menu (via the sitemap).
View 5 Replies
Similar Messages:
Sep 24, 2010
I have role assignments on both the first and second level of my menus within my sitemap file. The first level works fine, and I only see items assigned to my role. But roles assignments seem to have no effect on the second level. It seems like if you have access to the first level, you have access to everything on the second level. Is this correct?
From my sitemap (either a SalesRep or an Administrator can see everything underneath):
<siteMapNode title="Administration" roles="SalesRep,Administrator" description="Admin" >
<siteMapNode title="CompanyMaintenance" roles="SalesRep" url="~/Admin/CompanyManagement.aspx" />
<siteMapNode title="Initialize Roles" roles="Administrator" url="~/Admin/Roles.aspx"/>
</siteMapNode>
View 3 Replies
Jul 13, 2010
I hv created menu using sitemap xmldatasource now i want to display that based on Category or Roles. I have Created 4 Category in my sql Server 2005. when particular user logged in based on his Category menu nodes should display.
View 7 Replies
Oct 20, 2010
I have been trying to figure this out for a couple days, but am getting really confused on the many different posts/articles I have read.
I am trying to hide certain menu items based on the users role.
I have a Menu and a SiteMapDataSource on a master page:
[Code]....
View 2 Replies
May 4, 2010
I have a website created in ASP.Net 3.5(C#) and I have configued asp.net defalut membership provider for it.There are 5 different type of roles in this site. Now I want to display a small role based (i.e. depending upon the logged in user's role) menu whenever a user log-in to the site.For this I have added the code in the OnPageLoad() event of the master page, here is the code -
[Code]....
Now I wanted to know Is this code is logcally correct? And what is the security level of this code?
View 5 Replies
Feb 4, 2011
I have a menu with 3 Items; Home, Begineers and Experts. Menu is implemented in a masterpage and I build 3 more separate webpages which inherit the master.Userneeds to login and I store the User category in a Session["Category"].Can I disable the menu item "Expert" depending on the Session["Category"]? ( that is need to disable the menu when category is not equal to Expert)
View 2 Replies
Jan 14, 2010
How can I put a box around each of my Sitemap menu items? Also what are my options for graphically manipulating these Sitemap menu items?
View 4 Replies
Apr 8, 2013
What I want is to show menu items Administrator or show user menu items.Show menu items using login...How I can do it with roleĀ provider, control menu and siteMap in masterpage?
View 1 Replies
Jan 24, 2011
How could users in a "customer" role be retrieved from a MembershipUserCollection?
View 3 Replies
Mar 26, 2010
which i added one sitemap in whcih i added all the pages n i want to retrive that sitemap in masterpage based on login in whcih suppose admin hs login then display only admin pages with sitemap n if normal user hs login then it ll display only normal user pages with sitemap. here i didn't use login control but i create login page manually.
View 1 Replies
Jan 6, 2011
How to show menu with sitemap based on sql server data?
View 1 Replies
Apr 18, 2010
How do I create a menu in a ASP.NET MVC2 Master Page, dynamically based on the current user's "role"?
View 3 Replies
Dec 9, 2010
I have a tricky requirement where I need to categorise documents attached to a product, available for download, based on the status of the user viewing the product. I.e. my site displays a list of products, clicking on one displays a product details page, and this page includes a list a documents related to the product, such as data sheets, user manuals, etc.
I have been asked to group documents into three classes of availability, v.i.z. those available freely to all users, including anonymous; those available to logged on users; and those available to anonymous users that provide contact information before downloading the document, presumably to boost sales leads.
The anonymous and logged on availabilities are quite easy, but the third seems a bit tricky to me. My first question is, is there a way I can filter documents for only logged on users without hooking into ItemDataBound or something, and my second question is, what is recommended for the case where a user must supply contact information to download a document?
In the second question, it has crossed my mind to actually register the user, but without them having to visit the new user registration page, and then I have role based filtering of documents. Currently the new user registration process automatically adds the Member role to all new users. Users I register 'quietly', just so they can download a document, wont be assigned the Member role, distinguishing them from normally logged on members.
View 1 Replies
Aug 4, 2010
I just realized after i created a test account i was not in any roles. Is there a way to automically add new users into the role Users? Have i missed this some where?
View 8 Replies
Nov 16, 2010
I understand how web.sitemap works in conjunction with the site's menu in order to make menu/submenu choices visible/invisible depending on the authenticated user's roles.
For example, part of my web.sitemap has the following which defines 3 reports. Then, once users log in, those with "Managers" role can see all 3 reports while those with "Users" role can only see the 1st and the 3rd report:
<siteMapNode url="~/Reports/Reports.aspx" title="Reports" description="Reports" roles="Managers,Users">
<siteMapNode url="~/Reports/LettersReport.aspx" title="Letters Report" description="Letters Report" roles="Managers,Users" />
<siteMapNode url="~/Reports/UserSummaryReport.aspx" title="User Summary Report" description="User Summary Report" roles="Managers" />
<siteMapNode url="~/Reports/LetterSummaryReport.aspx" title="Letter Summary Report" description="Letter Summary Report" roles="Managers,Users" />
</siteMapNode>
How can I retrieve these results outside of the menu process? For example, in one of my web pages, I may need to create a dropdown list which should be populated with the results of the menu process.
How can I make the dropdown list show all 3 items when a manager has logged in but only 1st and 3rd items when a user has logged in?
View 1 Replies
Mar 4, 2010
I have an application that uses Forms Authentication and Role Management. I have a few users with more than one role associated to the user. Based on certain roles, the navigation menu displays certain menu options.
Right now, if the user has more than one role, the menu shows the items that are in both roles instead of the items that are in the particular role that the user is logged into or currently set to.
I'm creating an Authentication Ticket to log the user in and I'm passing the active user role as follows:
authenticationTicket = New FormsAuthenticationTicket(1, UserName, DateTime.Now, DateTime.Now.AddMinutes(20), False, UserRole)
Is there anyway to set the user to one particular role and have the application see the user in this single role instead of reading all the roles that the user is in?
View 1 Replies
Oct 27, 2010
I have implemented role based security in my asp.net 2.0 vb.net application using windows authentication and the windowstokenroleprovider and limiting access to certain pages using the location tag to specific active directory groups.
The issue is that when a user tries to access a page they are not authorized to view it brings up a login prompt and when it does not pass it takes them to the default page that tells them they are not authorized to view the page. I am wondering if there is a way to throw up a custom page that tells them they are not athorized to view the page that I can incorporate into the site itself with the header and so forth? if this page could come up in lieu of the sign in box popping up as well.
View 2 Replies
Feb 13, 2011
I am adding users to roles ,, but i think the users are not really connected to the role ??
One othe thing: does this code looks ok:
[code]....
View 3 Replies
Jun 7, 2010
I would like to collect all the emails from all users in a certain role. How would I do this ?
View 1 Replies
Mar 6, 2010
How can I collect all user (guid) from a specific role?
View 3 Replies
Jan 26, 2011
How do I get a list of email addresses from everyone in a particular role, so I can loop through and send them an email from my code behind?
I could do it through it by running a query and filling a data container, but it seems like there should a way through the membership class?
View 4 Replies
Apr 15, 2010
I am using the asp.net membership provider tables in sql server. I'm trying to figure out how to query a list of users that are NOT in any role.
View 4 Replies
Jul 23, 2013
I have menu item on which come from website map. I have trimmed the main item of menu based on user roles.
Like i have one menu in which i have 5 reports i want to show 2 reports to agents and 5 reports to admin. how to apply roles on sub menu item.
View 1 Replies
Jul 11, 2010
How to implement role based security in each page.
View 2 Replies
May 10, 2010
I have a simple custom membership provider. And i have a roles table also in my database with 2 roles in, User and admin. I dont think i need to implement the roleprovider as this will be overkill for what i need.
How can i modify the validate user method to route users to one URL and admin to another?
Can i put in a If statement to say If role = admin go here after a user has been validated?
[Code]....
View 3 Replies