Skip to content

Commit

Permalink
Merge pull request #31 from ewelinawilkosz/jcasc_169
Browse files Browse the repository at this point in the history
DataBoundSetter for accessKeys - JCasC compatibility
  • Loading branch information
stephenc committed May 11, 2018
2 parents 80038f7 + 695ea1b commit 9b280d3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/jenkins/metrics/api/MetricsAccessKey.java
Expand Up @@ -36,6 +36,7 @@
import org.acegisecurity.AccessDeniedException;
import org.apache.commons.lang.StringUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
Expand Down Expand Up @@ -463,6 +464,18 @@ public MetricsAccessKey getAccessKey(String accessKey) {
}
return null;
}


/**
*
* Setter for the list of access keys
*
* @param accessKeys the list of access keys to configure
*/
@DataBoundSetter
public synchronized void setAccessKeys(List<MetricsAccessKey> accessKeys) {
this.accessKeys = accessKeys;
}

public HttpResponse cors(@CheckForNull String accessKey, final HttpResponse resp) {
final MetricsAccessKey key = getAccessKey(accessKey);
Expand Down

0 comments on commit 9b280d3

Please sign in to comment.