MvcSiteMapProvider Roles
In this case "Admin" is the authorized user.
Add to web.config
1 2 3 | <appSettings> <add key= "MvcSiteMapProvider_SecurityTrimmingEnabled" value= "true" /> </appSettings> |
Add to (change in) module - MvcSiteMapProviderModule.cs
1 | bool securityTrimmingEnabled = true ; |
In Controller (above the action you want to constrict)
1 | [Authorize(Roles = "Admin" )] |
In Mvc.sitemap
1 | <mvcSiteMapNode title= "$resources:Common,AccountTitle" controller= "Account" action= "Index" roles= "Admin" /> |