title: Disable Input Fields in MVC View on Role Based Authorization using ASP.net Identity
body: <p>I have overridden <strong>AuthorizeAttribute</strong> class for role based authorization in our MVC application.</p>
  
  <pre><code>[HttpPOST]    
  [CustomAuthorize(Roles = "AddCOA")]
  public ActionResult Edit([Bind(Include = "N100,S104,S103,S101,S1,S100,D1")] TrM trM)
  {
      if (ModelState.IsValid)
      {
          db.Entry(trM).State = EntityState.Modified;
          db.SaveChanges();
          return RedirectToAction("View",trM);
      }
      return View(trM);
  }
  </code></pre>
  
  <p>I am calling this <strong>controller</strong> <strong>method</strong> from <strong>view</strong> with a list of Vouchers.  Now I have to disable the <strong>Edit ActionLink</strong> button in view for a certain <strong>role</strong>, how can I achieve this?</p>
  
  <pre><code>@Html.Actionlink("Edit", "Edit", "Controller", new{@class = "btn btn-success"})
  </code></pre>
  
  <p>For now it automatically redirects the view to login page.</p>