Ejemplo n.º 1
0
        public virtual IActionResult Warnings()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMaintenance))
            {
                return(AccessDeniedView());
            }
            var model = WarningsHelper.GetWarnings();

            return(View(model));
        }
Ejemplo n.º 2
0
        public virtual IActionResult Index()
        {
            //display a warning to a store owner if there are some error
            if (_permissionService.Authorize(StandardPermissionProvider.ManageMaintenance))
            {
                var errors = WarningsHelper.GetWarnings().Where(x => x.Level == SystemWarningLevel.Fail).ToList();
                if (errors.Any())
                {
                    WarningNotification(_localizationService.GetResource("Admin.System.Warnings.Errors"), false);
                }
            }

            var model = new DashboardModel
            {
                IsLoggedInAsVendor = _workContext.CurrentVendor != null
            };

            return(View(model));
        }