-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-72611] Forbid updating credentials ID for IdCredentials
#506
Changes from 2 commits
662b16b
0620d25
4772231
eb2d6ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,7 +23,6 @@ | |||||||||||||||||
*/ | ||||||||||||||||||
package com.cloudbees.plugins.credentials.impl; | ||||||||||||||||||
|
||||||||||||||||||
import com.cloudbees.plugins.credentials.BaseCredentials; | ||||||||||||||||||
import com.cloudbees.plugins.credentials.CredentialsDescriptor; | ||||||||||||||||||
import com.cloudbees.plugins.credentials.CredentialsScope; | ||||||||||||||||||
import com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials; | ||||||||||||||||||
|
@@ -35,15 +34,19 @@ | |||||||||||||||||
/** | ||||||||||||||||||
* A test credentials impl. | ||||||||||||||||||
*/ | ||||||||||||||||||
public class DummyCredentials extends BaseCredentials implements UsernamePasswordCredentials { | ||||||||||||||||||
public class DummyCredentials extends BaseStandardCredentials implements UsernamePasswordCredentials { | ||||||||||||||||||
|
||||||||||||||||||
private final String username; | ||||||||||||||||||
|
||||||||||||||||||
private final Secret password; | ||||||||||||||||||
|
||||||||||||||||||
@DataBoundConstructor | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the old constructor remain the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
there's a jelly file at least so at some point in time Stephen went to the effort of ensuring the UI at least worked...
Shouldn;t be as BaseStandardCredentials will generate a uniqueID if credentials-plugin/src/main/java/com/cloudbees/plugins/credentials/impl/BaseStandardCredentials.java Lines 78 to 82 in 7eb51b3
credentials-plugin/src/main/java/com/cloudbees/plugins/credentials/common/IdCredentials.java Lines 94 to 96 in 7eb51b3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just found out that https://github.com/jenkinsci/credentials-plugin/blob/master/src/test/java/com/cloudbees/plugins/credentials/impl/DummyIdCredentials.java exists. I'll revert the change here and only adapt affected tests to use |
||||||||||||||||||
public DummyCredentials(CredentialsScope scope, String username, String password) { | ||||||||||||||||||
super(scope); | ||||||||||||||||||
this(scope, null, null, username, password); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
public DummyCredentials(CredentialsScope scope, String id, String description, String username, String password) { | ||||||||||||||||||
super(scope, id, description); | ||||||||||||||||||
this.username = username; | ||||||||||||||||||
this.password = Secret.fromString(password); | ||||||||||||||||||
} | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, updated in eb2d6ca