public override void OnActionExecuting(ActionExecutingContext filterContext) { var user = BLUser <ETUserAdmin> .GetLogged(); if (user == null) { filterContext.Result = new RedirectResult("/Admin/Login"); } }
public override void OnActionExecuting(ActionExecutingContext filterContext) { var user = BLUser <ETUserPublic> .GetLogged(); if (user != null) { filterContext.Result = new RedirectResult(HelpersMethods.GetLastUrl()); } }
public override void OnActionExecuting(ActionExecutingContext filterContext) { var user = BLUser <ETUserPublic> .GetLogged(); if (user == null) { filterContext.Result = new RedirectResult("../AccessDenied/"); } }