Ejemplo n.º 1
0
        public ActionResult DisplaySettings(DisplaySettingsPageModel model)
        {
            if (!_services.Authorizer.Authorize(Permissions.ManageSitemap, T("Not allowed to manage sitemap")))
                return new HttpUnauthorizedResult();

            _sitemapService.SetRoutes(model.Routes);
            _services.Notifier.Add(NotifyType.Information, T("Saved Sitemap display layout"));
            return RedirectToAction("DisplaySettings");
        }
        public ActionResult DisplaySettings()
        {
            if (!_services.Authorizer.Authorize(Permissions.ManageSitemap, T("Not allowed to manage sitemap")))
                return new HttpUnauthorizedResult();

            var routes = _sitemapService.GetRoutes();
            var model = new DisplaySettingsPageModel {
                AutoLayout = false,
                Routes = routes.ToList()
            };
            return View(model);
        }