public override void OnActionExecuting(ActionExecutingContext filterContext) { if (!RvsPrincipal.IsAuthorize(_featureId)) { filterContext.Result = new RedirectToRouteResult( new RouteValueDictionary { { "controller", "Home" }, { "action", "Index" } }); } }
public static bool IsSuperUser(this HtmlHelper html) { return(RvsPrincipal.IsSuperUser()); }
public static bool IsAuthorized(this HtmlHelper html, string featureId) { return(RvsPrincipal.IsAuthorize(featureId)); }