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