public ActionResult EditLayerDeletePOST(int id) { if (!Services.Authorizer.Authorize(Permissions.ManageWidgets, T(NotAuthorizedManageWidgetsLabel))) { return(new HttpUnauthorizedResult()); } try { _widgetsService.DeleteLayer(id); Services.Notifier.Information(T("Layer was successfully deleted")); } catch (Exception exception) { this.Error(exception, T("Removing Layer failed: {0}", exception.Message), Logger, Services.Notifier); } return(RedirectToAction("Index", "Admin")); }
public ActionResult EditLayerDeletePOST(int id) { if (!IsAuthorizedToManageWidgets()) { return(new HttpUnauthorizedResult()); } try { _widgetsService.DeleteLayer(id); Services.Notifier.Information(T("Layer was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Layer failed: {0}", exception.Message).Text); Services.Notifier.Error(T("Removing Layer failed: {0}", exception.Message)); } return(RedirectToAction("Index", "Admin")); }