Ejemplo n.º 1
0
        public IActionResult Login()
        {
            LoginViewModel model = new LoginViewModel();

            if (signInManager.IsSignedIn(User))
            {
                if (User.IsInRole("GlobalAdmin") || User.IsInRole("Admin"))
                {
                    return(RedirectToAction("ListQuestion", "Admin"));
                }
                else
                {
                    return(RedirectToAction("Index", "Survey"));
                }
            }
            ViewBag.ProjectInstance = surveyRepository.GetAllProjectInstance();
            return(View());
        }