public override void OnAuthorization(AuthorizationContext filterContext) { if (Ignore == false) { return; } if (ManageProvider.Provider.IsOverdue()) { CookieHelper.WriteCookie("login_error", "overdue"); filterContext.Result = new ContentResult() { Content = "<script>top.location.href = '/Login/Index';</script>" }; } else { if (ManageProvider.Provider.Current().User.F_System_Mark == 1 || AuthApp.Auth()) { LogApp.Write(LogApp.Result.Success); return; } else { LogApp.Write(LogApp.Result.Fail); filterContext.Result = new ContentResult() { Content = "<script>alert('权限不足');</script>" }; } } }
public override void OnAuthorization(AuthorizationContext filterContext) { if (Ignore == false) { return; } if (ManageProvider.Provider.IsOverdue()) { CookieHelper.WriteCookie("login_error", "overdue"); filterContext.Result = new ContentResult() { Content = "<script>top.location.href = '/Login/Index';</script>" }; } else { LogApp.Write(LogApp.Result.Success); } }