public TicketDetailDto GetTicketDetailDto(TicketReference reference)
        {
            var result = wrapped.GetTicketDetailDto(reference);

            if (result == null)
            {
                return(null);
            }

            result.CanEdit = capabilityProvider.DoesUserHaveCapability(TicketCapability.Edit, Identity.Create <Ticket>(result.Id));
            return(result);
        }
Beispiel #2
0
        public ActionResult Index(TicketReference id)
        {
            var ticket = ticketDetailProvider.GetTicketDetailDto(id);

            if (ReferenceEquals(ticket, null))
            {
                logger.DebugFormat("Ticket reference (to view) not found: {0}", id);
                return(HttpNotFound());
            }

            var model = GetViewTicketModel(ticket);

            return(View(model));
        }