Esempio n. 1
0
        public virtual IActionResult View(int id)
        {
            //try to get a log with the specified id
            var log = _logger.GetLogById(id);

            if (log == null)
            {
                return(RedirectToAction("List"));
            }

            //prepare model
            LogModel model = _logModelFactory.PrepareLogModel(null, log);

            return(View(model));
        }
Esempio n. 2
0
        public async Task <IActionResult> View(int id)
        {
            if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageSystemLog))
            {
                return(AccessDeniedView());
            }

            var log = await _logger.GetLogById(id);

            if (log == null)
            {
                return(RedirectToAction("List"));
            }

            //prepare model
            var model = await _logModelFactory.PrepareLogModel(null, log);

            return(View(model));
        }
Esempio n. 3
0
        public virtual IActionResult View(int id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageSystemLog))
            {
                return(AccessDeniedView());
            }

            //try to get a log with the specified id
            var log = _logger.GetLogById(id);

            if (log == null)
            {
                return(RedirectToAction("List"));
            }

            //prepare model
            var model = _logModelFactory.PrepareLogModel(null, log);

            return(View(model));
        }