In our ASP.NET MVC 3 intranet application, configured with WindowsTokenRoleProvider for authentication, users must be members of a certain AD group in order to access administrative content. We have solved this by applying AuthorizeAttribute to the administrative MVC controller. However, we haven’t integrated the administrative content with the GUI menu system yet.
To this end, we’d like to add links to the administrative sections to the app menu, but for authorized users only. This brings us to the question at hand, how can we in the view template (*.cshtml) render content depending on whether the user is part of the required AD group or not?
You can try something like below