Skip to content

Commit

Permalink
Merge pull request #51 from jenkinsci/jenkins-35130
Browse files Browse the repository at this point in the history
[FIXED JENKINS-35130] Delete and Move credentials do not work with providers that do not have modifiable domains
  • Loading branch information
stephenc committed May 25, 2016
2 parents 4b409d8 + 28d6d45 commit be60a05
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -1008,9 +1008,6 @@ public CredentialsStore getStore() {
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doDoDelete(StaplerRequest req) throws IOException {
if (!getStore().isDomainsModifiable()) {
return HttpResponses.status(400);
}
getStore().checkPermission(DELETE);
if (getStore().removeCredentials(domain.getDomain(), credentials)) {
return HttpResponses.redirectTo("../..");
Expand All @@ -1030,7 +1027,7 @@ public HttpResponse doDoDelete(StaplerRequest req) throws IOException {
@Restricted(NoExternalUse.class)
@SuppressWarnings("unused") // stapler web method
public HttpResponse doDoMove(StaplerRequest req, @QueryParameter String destination) throws IOException {
if (!getStore().isDomainsModifiable()) {
if (getStore().getDomains().size() <= 1) {
return HttpResponses.status(400);
}
// TODO switch to Jenkins.getInstance() once 2.0+ is the baseline
Expand Down

0 comments on commit be60a05

Please sign in to comment.