/** * {@inheritDoc} */ @Override protected int run() throws Exception { store.checkPermission(CredentialsProvider.DELETE); Domain domain = getDomainByName(store, this.domain); if (domain == null) { stderr.println("No such domain"); return 2; } Credentials existing = getCredentialsById(store, domain, id); if (existing == null) { stderr.println("No such credential"); return 3; } if (store.removeCredentials(domain, existing)) { return 0; } stderr.println("Not deleted"); return 1; }
/** * {@inheritDoc} */ @Override protected int run() throws Exception { store.checkPermission(CredentialsProvider.DELETE); Domain domain = getDomainByName(store, this.domain); if (domain == null) { stderr.println("No such domain"); return 2; } Credentials existing = getCredentialsById(store, domain, id); if (existing == null) { stderr.println("No such credential"); return 3; } if (store.removeCredentials(domain, existing)) { return 0; } stderr.println("Not deleted"); return 1; }
if (getStore().removeCredentials(domain.getDomain(), credentials)) { return HttpResponses.redirectTo("../.."); } else { destinationStore.removeCredentials(destinationDomain, credentials);
if (getStore().removeCredentials(domain.getDomain(), credentials)) { return HttpResponses.redirectTo("../.."); } else { destinationStore.removeCredentials(destinationDomain, credentials);
/** * Deletes the credentials. * * @param req the request. * @return the response. * @throws IOException if something goes wrong. */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler web method public HttpResponse doDoDelete(StaplerRequest req) throws IOException { getStore().checkPermission(DELETE); if (getStore().removeCredentials(domain.getDomain(), credentials)) { return HttpResponses.redirectTo("../.."); } return HttpResponses.redirectToDot(); }
if (getStore().removeCredentials(domain.getDomain(), credentials)) { return; } else {
/** * Deletes the credentials. * * @param req the request. * @return the response. * @throws IOException if something goes wrong. */ @RequirePOST @Restricted(NoExternalUse.class) @SuppressWarnings("unused") // stapler web method public HttpResponse doDoDelete(StaplerRequest req) throws IOException { getStore().checkPermission(DELETE); if (getStore().removeCredentials(domain.getDomain(), credentials)) { return HttpResponses.redirectTo("../.."); } return HttpResponses.redirectToDot(); }
if (getStore().removeCredentials(domain.getDomain(), credentials)) { return; } else {