public ActionResult Details(int?id) { Ticket ticket = db.Tickets.Find(id); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (ticket == null) { return(HttpNotFound()); } if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Login", "Account")); } if (accessHelper.CanSeeDetails(ticket)) { return(View(ticket)); } else { return(RedirectToAction("NotAllowedTicket", "Home")); } }