title: asp.net MVC3 razor: display actionlink based on user role
body: <p>I'm new to MVC. I want to be able to hide some actionlinks for some users. Say I have a "create" actionlink which I only want administrators to see and click. I want to use some sort of "loggedintemplate" available in asp.net, but it doesn't seem to work in razor.</p>
  
  <p>I could use some sort of code block with an if statement checking the current user and her role, however that may not be best practice?</p>
  
  <p>my index.cshtml..</p>
  
  <pre><code>// want some adminauth attribute here...
  @Html.ActionLink("Create New", "Create")
  </code></pre>
  
  <p>my controller..</p>
  
  <pre><code>// GET: /Speaker/Create
  [Authorize(Roles = "Administrators")]
  public ActionResult Create()
  {
      return View();
  }
  </code></pre>