I wish to display content depending on the given role(s) of the active user , in the ASP.NET MVC.
Compare the old fashion way, using WebForms:
protec
this worked for me:
<% MembershipUser mu = Membership.GetUser(); if (mu != null) if (Roles.IsUserInRole(mu.UserName, "Administrator")) { %> <%= Html.ActionLink("User Administration", "GetUsers", "Account")%> <%} %>