I have 3 profiles registered in the database SQL Server, they are Master, Admin and User, when you log in as you would for each user to be directed to your permission view. by default the route is loading the home / index.
// POST: /Account/Login
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
{
if (!ModelState.IsValid)
{
return View(model);
}
// Isso não conta falhas de login em relação ao bloqueio de conta
// Para permitir que falhas de senha acionem o bloqueio da conta, altere para shouldLockout: true
var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
switch (result)
{
case SignInStatus.Success:
return RedirectToLocal(returnUrl);
case SignInStatus.LockedOut:
return View("Lockout");
case SignInStatus.RequiresVerification:
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
case SignInStatus.Failure:
default:
ModelState.AddModelError("", "Tentativa de login inválida.");
return View(model);
}
}
how would I implement if, tried and did not compile, with your information above. @ gilberto-b-terra-jr