Exemplo n.º 1
0
        public ActionResult Detail(int id)
        {
            if (!_authorizer.Authorize(Permissions.ViewAuditTrail))
            {
                return(new HttpUnauthorizedResult());
            }

            var record       = _auditTrailManager.GetRecord(id);
            var descriptor   = _auditTrailManager.DescribeEvent(record);
            var detailsShape = _displayBuilder.BuildDisplay(record, "Detail");
            var viewModel    = new AuditTrailDetailsViewModel {
                Record       = record,
                Descriptor   = descriptor,
                DetailsShape = detailsShape
            };

            return(View(viewModel));
        }