Skip to content

Commit

Permalink
[JENKINS-26099] Permit StringCredentialsImpl.id and FileCredentialsIm…
Browse files Browse the repository at this point in the history
…pl.id to be configured.
  • Loading branch information
jglick committed Jan 14, 2015
1 parent 846644a commit 0ba4a8a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -40,7 +40,7 @@
<dependency> <dependency>
<groupId>org.jenkins-ci.plugins</groupId> <groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId> <artifactId>credentials</artifactId>
<version>1.20</version> <version>1.21-20150114.010642-1</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
Expand Down
Expand Up @@ -24,7 +24,6 @@


package org.jenkinsci.plugins.plaincredentials.impl; package org.jenkinsci.plugins.plaincredentials.impl;


import com.cloudbees.plugins.credentials.CredentialsDescriptor;
import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.CredentialsScope;
import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials; import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials;
import hudson.Extension; import hudson.Extension;
Expand Down Expand Up @@ -94,7 +93,7 @@ private byte[] unencrypted() throws IOException {
return new ByteArrayInputStream(unencrypted()); return new ByteArrayInputStream(unencrypted());
} }


@Extension public static class DescriptorImpl extends CredentialsDescriptor { @Extension public static class DescriptorImpl extends BaseStandardCredentialsDescriptor {


@Override public String getDisplayName() { @Override public String getDisplayName() {
return Messages.FileCredentialsImpl_secret_file(); return Messages.FileCredentialsImpl_secret_file();
Expand Down
Expand Up @@ -24,7 +24,6 @@


package org.jenkinsci.plugins.plaincredentials.impl; package org.jenkinsci.plugins.plaincredentials.impl;


import com.cloudbees.plugins.credentials.CredentialsDescriptor;
import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.CredentialsScope;
import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials; import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials;
import hudson.Extension; import hudson.Extension;
Expand All @@ -47,7 +46,7 @@ public final class StringCredentialsImpl extends BaseStandardCredentials impleme
return secret; return secret;
} }


@Extension public static class DescriptorImpl extends CredentialsDescriptor { @Extension public static class DescriptorImpl extends BaseStandardCredentialsDescriptor {


@Override public String getDisplayName() { @Override public String getDisplayName() {
return Messages.StringCredentialsImpl_secret_text(); return Messages.StringCredentialsImpl_secret_text();
Expand Down
Expand Up @@ -23,10 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
--> -->
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler">
<f:invisibleEntry>
<f:textbox field="id"/>
</f:invisibleEntry>
<j:choose> <j:choose>
<j:when test="${instance == null}"> <j:when test="${instance == null}">
<f:entry title="${%File}" field="file"> <f:entry title="${%File}" field="file">
Expand All @@ -47,7 +44,5 @@ THE SOFTWARE.
</f:optionalBlock> </f:optionalBlock>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>
<f:entry title="${%Description}" field="description"> <st:include page="id-and-description" class="${descriptor.clazz}"/>
<f:textbox/>
</f:entry>
</j:jelly> </j:jelly>
Expand Up @@ -23,14 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
--> -->
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler">
<f:invisibleEntry>
<f:textbox field="id"/>
</f:invisibleEntry>
<f:entry title="${%Secret}" field="secret"> <f:entry title="${%Secret}" field="secret">
<f:password/> <f:password/>
</f:entry> </f:entry>
<f:entry title="${%Description}" field="description"> <st:include page="id-and-description" class="${descriptor.clazz}"/>
<f:textbox/>
</f:entry>
</j:jelly> </j:jelly>

0 comments on commit 0ba4a8a

Please sign in to comment.