Skip to content
Permalink
Browse files

[JENKINS-43507] Found some minor bugs in the form validation action m…

…ethod names
  • Loading branch information...
stephenc committed Jun 23, 2017
1 parent f52fe82 commit 15f218a5aeb3dc52b777c3e7ba4bb35aed1b8ef7
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/jenkins/plugins/git/GitSCMSource.java
@@ -439,7 +439,7 @@ public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner cont
}

public FormValidation doCheckCredentialsId(@AncestorInPath SCMSourceOwner context,
@QueryParameter String url,
@QueryParameter String remote,
@QueryParameter String value) {
if (context == null && !Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER) ||
context != null && !context.hasPermission(Item.EXTENDED_READ)) {
@@ -451,8 +451,8 @@ public FormValidation doCheckCredentialsId(@AncestorInPath SCMSourceOwner contex
return FormValidation.ok();
}

url = Util.fixEmptyAndTrim(url);
if (url == null)
remote = Util.fixEmptyAndTrim(remote);
if (remote == null)
// not set, can't check
{
return FormValidation.ok();
@@ -464,7 +464,7 @@ public FormValidation doCheckCredentialsId(@AncestorInPath SCMSourceOwner contex
context instanceof Queue.Task
? Tasks.getAuthenticationOf((Queue.Task) context)
: ACL.SYSTEM,
URIRequirementBuilder.fromUri(url).build(),
URIRequirementBuilder.fromUri(remote).build(),
GitClient.CREDENTIALS_MATCHER)) {
if (StringUtils.equals(value, o.value)) {
// TODO check if this type of credential is acceptable to the Git client or does it merit warning

0 comments on commit 15f218a

Please sign in to comment.
You can’t perform that action at this time.