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