Skip to content

Commit

Permalink
Revert "Add option to include or exclude user creds"
Browse files Browse the repository at this point in the history
This reverts commit a452906

Signed-off-by: Matt Sicker <boards@gmail.com>
  • Loading branch information
jvz committed Jul 9, 2019
1 parent a452906 commit 27c2cea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

Expand All @@ -42,10 +41,6 @@ public class CredentialsParameterDefinition extends SimpleParameterDefinition {
* Whether to fail the build if the credential cannot be resolved.
*/
private final boolean required;
/**
* Whether or not to include user-scoped credentials
*/
private boolean includeUser;

@DataBoundConstructor
public CredentialsParameterDefinition(String name, String description, String defaultValue, String credentialType,
Expand Down Expand Up @@ -113,15 +108,6 @@ public boolean isRequired() {
return required;
}

@DataBoundSetter
public void setIncludeUser(boolean includeUser) {
this.includeUser = includeUser;
}

public boolean isIncludeUser() {
return includeUser;
}

/**
* Our descriptor.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<f:entry field="required" title="${%Required}">
<f:checkbox/>
</f:entry>
<f:entry field="includeUser" title="${%Include user credentials}">
<f:checkbox/>
</f:entry>
<f:entry field="defaultValue" title="${%Default Value}">
<c:select/>
</f:entry>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,14 @@
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project" xmlns:c="/lib/credentials">
<f:entry title="${it.name}" description="${it.description}">
<j:set var="includeUser" value="${it.includeUser}"/>
<j:if test="${includeUser}">
<div><strong>NOTICE:</strong> Only provide user credentials to trusted builds</div>
</j:if>
<div name="parameter" description="${it.description}">
<div name="parameter" description="${it.description}" tooltip="&lt;strong&gt;WARNING:&lt;/strong&gt; Only provide credentials to trusted builds">
<input type="hidden" name="name" value="${it.name}" />
<input type="hidden" name="credentialType" value="${it.credentialType}" />
<input type="hidden" name="required" value="${it.required}" />
<j:scope>
<j:set var="instance" value="${it}"/>
<j:set var="descriptor" value="${it.descriptor}"/>
<c:select field="value" default="${it.defaultValue}" includeUser="${includeUser}"/>
<c:select field="value" default="${it.defaultValue}" includeUser="true"/>
</j:scope>
</div>
</f:entry>
Expand Down

0 comments on commit 27c2cea

Please sign in to comment.