public ActionResult DeleteConfirmed(int id) { if (!Services.Permissions.Authorize(StandardPermissionProvider.ManageMenus)) { return(AccessDeniedView()); } var menu = _menuStorage.GetMenuById(id); if (menu == null) { return(HttpNotFound()); } if (menu.IsSystemMenu) { NotifyError(T("Admin.ContentManagement.Menus.CannotBeDeleted")); return(RedirectToAction("Edit", new { id = menu.Id })); } _menuStorage.DeleteMenu(menu); NotifySuccess(T("Admin.Common.TaskSuccessfullyProcessed")); return(RedirectToAction("List")); }
public ActionResult DeleteConfirmed(int id) { var menu = _menuStorage.GetMenuById(id); if (menu == null) { return(HttpNotFound()); } if (menu.IsSystemMenu) { NotifyError(T("Admin.ContentManagement.Menus.CannotBeDeleted")); return(RedirectToAction("Edit", new { id = menu.Id })); } _menuStorage.DeleteMenu(menu); NotifySuccess(T("Admin.Common.TaskSuccessfullyProcessed")); return(RedirectToAction("List")); }