Created
March 30, 2013 01:08
-
-
Save bernardoVale/5274792 to your computer and use it in GitHub Desktop.
Olha ai
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (HttpContext.User.Identity.IsAuthenticated) | |
{ | |
if (UserAuthorization.IsAuthorized(AuthorizationType.Cliente)) | |
{ | |
//Tudo ok autenticado e autorizado | |
return View(cliente); | |
} | |
//Nao esta autorizado manda pro unauthorized | |
return RedirectToAction("Unauthorized", "Access"); | |
} | |
//O Imbecil nem ta autenticado | |
return RedirectToAction("Index", "Access"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment