Exemplo n.º 1
0
        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);
                }

            }
        }
Exemplo n.º 2
0
 public ProfileController(WFSUserManager wfsUserMgr, OrderProfileManager profManager, SchoolManager schoolMgr)
 {
     this._wfsUserMgr = wfsUserMgr;
     this._profManager = profManager;
     this._schoolMgr = schoolMgr;
 }
Exemplo n.º 3
0
 public LoginAsController(WFSUserManager userManager)
 {
     _userManager = userManager;
 }
Exemplo n.º 4
0
 public AccountController(WFSUserManager wfsUSerManager)
 {
     _wfsUSerManager = wfsUSerManager;
 }
Exemplo n.º 5
0
 public HomeController(WFSUserManager userManager)
 {
     _userManager = userManager;
 }
Exemplo n.º 6
0
 public SupportTicketController(WFSUserManager wfsUserMgr, SupportTicketManager tickManager)
 {
     this._wfsUserMgr = wfsUserMgr;
     this._tickManager = tickManager;
 }