Skip to content

Commit

Permalink
[FIXED JENKINS-44171] Editing the "description" field of a global cre…
Browse files Browse the repository at this point in the history
…dential deletes the "usage" history.

- Side-effect, all existing usage tracking will now be lost
  • Loading branch information
stephenc committed Jul 20, 2017
1 parent 8d4352e commit d2abc56
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -27,6 +27,7 @@
import com.cloudbees.plugins.credentials.common.StandardCredentials;
import com.cloudbees.plugins.credentials.domains.Domain;
import com.cloudbees.plugins.credentials.domains.DomainSpecification;
import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
Expand Down Expand Up @@ -135,6 +136,8 @@ public abstract class CredentialsStoreAction

static {
SECRETS_REDACTED = new XStream2();
SECRETS_REDACTED.omitField(BaseStandardCredentials.class, "description");
SECRETS_REDACTED.omitField(StandardCredentials.class, "description");
SECRETS_REDACTED.registerConverter(new Converter() {
/**
* {@inheritDoc}
Expand Down

0 comments on commit d2abc56

Please sign in to comment.