protected override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); if (this.HttpContext.Request.IsAuthenticated && AuthenticatedUserId > 0) { var _userManager = new WFSUserManager(new WFS.Repository.WFSRepository((DbContext)new WFS.DataContext.WFSEntities())); var resp = _userManager.GetWfsUserInfoById(new GetWfsUserInfoByIdRequest() { UserId = AuthenticatedUserId }); var roles = Roles.GetRolesForUser(resp.Value.Username); var role = roles.FirstOrDefault(); if (role != null) { var routeName = string.Format("{0}.dashboard", role); var url = string.Format("/{0}/Dashboard", role); var context = new RequestContext(filterContext.HttpContext, filterContext.RouteData); context.HttpContext.Response.Redirect(url, true); } } }
public ProfileController(WFSUserManager wfsUserMgr, OrderProfileManager profManager, SchoolManager schoolMgr) { this._wfsUserMgr = wfsUserMgr; this._profManager = profManager; this._schoolMgr = schoolMgr; }
public LoginAsController(WFSUserManager userManager) { _userManager = userManager; }
public AccountController(WFSUserManager wfsUSerManager) { _wfsUSerManager = wfsUSerManager; }
public HomeController(WFSUserManager userManager) { _userManager = userManager; }
public SupportTicketController(WFSUserManager wfsUserMgr, SupportTicketManager tickManager) { this._wfsUserMgr = wfsUserMgr; this._tickManager = tickManager; }