Example #1
0
        public static MvcHtmlString RoleActionMenuLink(this HtmlHelper helper, String linkText, String actionName, String controllerName, String roleName)
        {
            string[] roles = roleName.Split(',');

            return(roles.Where(Roles.IsUserInRole).Count() > 0 ?
                   helper.ActionMenuItem(linkText, actionName, controllerName) :
                   MvcHtmlString.Empty);
        }