security-trimming

Link security trimming in asp.net mvc

I would like to show some links only to authenticated users in an asp.net mvc web application. I use the template for an asp.net mvc web application in Visual Studio 2008 that came with the beta release of asp.net mvc. I use forms authentication. I would like to add something like the following to an existing view: <a href="/Account...

c# Sql SiteMap Provider security Trimming not working

Hi there, While I was using web.sitemap the security Trimming on my menu was working fine. Now that I have switched to a Sql Site Map Provider, the security trimming just stopped working. <siteMap enabled="true" defaultProvider="AspNetSqlSiteMapProvider"> <providers> <add name="AspNetSqlSiteMapProvider" type="SqlSiteMapProvi...

Sitemap security trimming using roles attributes only, and not allow/deny rules elsewhere.

I am aware that the tag has the "roles" attribute to make up for the nodes that don't have the "url" attribute, which can be resolved in other ways. I'm not interested in these other ways, though, I'd like to have all my permissions set in my sitemap file. How to accomplish this? I'm using custom RoleProvider, custom MembershipProvider...

How to affect single child nodes when Security Trimming a SiteMap?

I have a ASP.Net site, in which I'm trying to use Windows Authentication and Active Directory roles to limit access to some pages. I've looked at a tutorial page from Scott Gu, but I can't quite achieve what I want. I'm ignoring the root node in my SiteMapDataSource. I want to show the "Documents" node to all users, but limit the displa...

Show/Hide custom menu items as based on Roles/Web.sitemap file

I have a custom menu, which leverages the standard asp.net sitemap. It works well but some of my pages are dynamically generated by URL rewriter, so they don't sit in the sitemap XML file. At the moment I rolled a custom solution which shows/hides menu items via CSS class and a programmatic check of the role that the user is in. It works...

Security Trimming via SiteMap using authentication status?

Does anyone know if there is a way to use a site map to perform security trimming based on authentication status? For example, we can trim based on role using <SiteMapNode title="Page" roles="Administrator"> Or allow anyone with <SiteMapNode title="Page" roles="*"> But I have a series of pages for logging in, registering, etc. th...

How does XmlSiteMapProvider check user to be in specified role?

I roll my own SiteMapProvider inheriting System.Web.XmlSiteMapProvider. I want to override logic of checking user to be in a role specified in siteMapNode's property roles: <siteMapNode url="Add.aspx?type=user" title="Add user" roles="admin" /> How can I do that? Which class's member does XmlSiteMapProvider call to check that if secu...