Skip to content

Commit

Permalink
Merge branch 'permission-dropcolumn' into HOSTING-808
Browse files Browse the repository at this point in the history
  • Loading branch information
willwh committed Oct 25, 2019
2 parents 5df091f + 191e64c commit 4ddbd36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@
<f:textbox default="10"/>
</f:entry>

<f:advanced>
<j:if test="${h.hasPermission(app.ADMINISTER)}">
<f:advanced>

<f:entry title="Custom Columns" field="column" >
<f:select id="selectColumn" onclick="updateListBox('selectColumn', '/descriptorByName/org.jenkinsci.plugins.environmentdashboard.EnvDashboardView/fillColumnItems')" />
</f:entry>
<f:entry title="Custom Columns" field="column" >
<f:select id="selectColumn" onclick="updateListBox('selectColumn', '/descriptorByName/org.jenkinsci.plugins.environmentdashboard.EnvDashboardView/fillColumnItems')" />
</f:entry>

<f:entry >
<f:validateButton title="${%Drop column}" progress="${%Processing...}"
method="dropColumn" with="column" />
</f:entry>
<f:entry >

</f:advanced>
<f:validateButton title="${%Drop column}" progress="${%Processing...}"
method="dropColumn" with="column" />
</f:entry>

</f:advanced>
</j:if>

</j:jelly>

0 comments on commit 4ddbd36

Please sign in to comment.