Skip to content

Commit 8d42a58

Browse files
authored
Merge pull request #166 from dodo920306/fix/deprecated-credential-api
Fix the deprecated Credentials call
2 parents 7a857b3 + 6fbac7b commit 8d42a58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/io/jenkins/plugins/luxair/ImageTagParameterDefinition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ private StandardUsernamePasswordCredentials findCredential(String credentialId)
167167
.map(request -> request.findAncestorObject(Item.class))
168168
.orElse(null);
169169

170-
List<StandardUsernamePasswordCredentials> lookupCredentials = CredentialsProvider.lookupCredentials(
170+
List<StandardUsernamePasswordCredentials> lookupCredentials = CredentialsProvider.lookupCredentialsInItem(
171171
StandardUsernamePasswordCredentials.class,
172172
context,
173-
context instanceof Queue.Task ? Tasks.getAuthenticationOf((Queue.Task)context) : ACL.SYSTEM,
173+
context instanceof Queue.Task ? Tasks.getAuthenticationOf2((Queue.Task)context) : ACL.SYSTEM2,
174174
Collections.emptyList());
175175
CredentialsMatcher allOf = CredentialsMatchers.allOf(CredentialsMatchers.withId(credentialId));
176176
return CredentialsMatchers.firstOrNull(lookupCredentials, allOf);
@@ -236,7 +236,7 @@ public ListBoxModel doFillCredentialIdItems(@AncestorInPath Item context,
236236
}
237237
return new StandardListBoxModel()
238238
.includeEmptyValue()
239-
.includeAs(ACL.SYSTEM, context, StandardUsernameCredentials.class)
239+
.includeAs(ACL.SYSTEM2, context, StandardUsernameCredentials.class)
240240
.includeCurrentValue(credentialId);
241241
}
242242
}

0 commit comments

Comments
 (0)