Skip to content

Commit

Permalink
[JENKINS-44271] doFillcredentialsId to look for Item not SCMSourceOwner.
Browse files Browse the repository at this point in the history
The method GitSCMSource.DescriptorImpl#doFillCredentialsIdItems
expects the parameter 'context' to be an SCMSourceOwner which breaks
the ability to add a global library at the level of a folder with the
modern SCM implementation. Changing the parameter type from
SCMSourceOwner to Item solves the issue.
  • Loading branch information
acontes1a committed Jul 26, 2017
1 parent 5b31a94 commit 9841317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/jenkins/plugins/git/GitSCMSource.java
Expand Up @@ -424,7 +424,7 @@ public String getDisplayName() {
return Messages.GitSCMSource_DisplayName();
}

public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner context,
public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Item context,
@QueryParameter String remote,
@QueryParameter String credentialsId) {
if (context == null && !Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER) ||
Expand All @@ -441,8 +441,8 @@ public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner cont
GitClient.CREDENTIALS_MATCHER)
.includeCurrentValue(credentialsId);
}

public FormValidation doCheckCredentialsId(@AncestorInPath SCMSourceOwner context,
public FormValidation doCheckCredentialsId(@AncestorInPath Item context,
@QueryParameter String remote,
@QueryParameter String value) {
if (context == null && !Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER) ||
Expand Down

0 comments on commit 9841317

Please sign in to comment.