Skip to content

Instantly share code, notes, and snippets.

@pparadis
Created March 31, 2015 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pparadis/28ab7da08cf367ad31d3 to your computer and use it in GitHub Desktop.
Save pparadis/28ab7da08cf367ad31d3 to your computer and use it in GitHub Desktop.
[Authorize]
public class AccountController : Controller
{
public AccountController () { . . . }
[AllowAnonymous]
public ActionResult Register() { . . . }
public ActionResult Manage() { . . . }
public ActionResult LogOff() { . . . }
}
//exemple tiré de https://msdn.microsoft.com/en-us/library/system.web.mvc.authorizeattribute%28v=vs.118%29.aspx#exampleToggle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment