From 191e64c0dc370197e1667bdd985750d34cacaae6 Mon Sep 17 00:00:00 2001 From: Jarek Strzelecki Date: Thu, 24 Oct 2019 10:48:24 +0200 Subject: [PATCH] Check permission on doDropColumn --- .../EnvDashboardView.java | 1 + .../EnvDashboardView/configure-entries.jelly | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView.java b/src/main/java/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView.java index 32a41e8..6a7978b 100644 --- a/src/main/java/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView.java +++ b/src/main/java/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView.java @@ -189,6 +189,7 @@ public ListBoxModel doFillColumnItems() { @SuppressWarnings("unused") public FormValidation doDropColumn(@QueryParameter("column") final String column) { + Hudson.getInstance().checkPermission(Jenkins.ADMINISTER); Connection conn = null; Statement stat = null; if ("".equals(column)) { diff --git a/src/main/resources/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView/configure-entries.jelly b/src/main/resources/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView/configure-entries.jelly index 8434a19..d5afc55 100644 --- a/src/main/resources/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView/configure-entries.jelly +++ b/src/main/resources/org/jenkinsci/plugins/environmentdashboard/EnvDashboardView/configure-entries.jelly @@ -13,17 +13,20 @@ - + + - - - + + + - - - + - + + + + +