示例#1
0
        public async Task <ActionResult> Display(string auditTrailEventId)
        {
            if (!await _authorizationService.AuthorizeAsync(User, AuditTrailPermissions.ViewAuditTrail))
            {
                return(Forbid());
            }

            var auditTrailEvent = await _auditTrailManager.GetEventAsync(auditTrailEventId);

            if (auditTrailEvent == null)
            {
                return(NotFound());
            }


            var shape = await _displayManager.BuildDisplayAsync(auditTrailEvent, updater : _updateModelAccessor.ModelUpdater, displayType : "DetailAdmin");

            return(View(new AuditTrailItemViewModel {
                Shape = shape
            }));
        }