Skip to content

Commit

Permalink
[JENKINS-28732] Configure the parameter after reading old format.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Mar 19, 2016
1 parent 65b87e1 commit 8a0b0b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/biouno/unochoice/model/GroovyScript.java
Expand Up @@ -33,6 +33,7 @@
import javax.annotation.Nullable;

import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript;
import org.jenkinsci.plugins.scriptsecurity.scripts.ApprovalContext;
import org.kohsuke.stapler.DataBoundConstructor;

import groovy.lang.Binding;
Expand Down Expand Up @@ -88,10 +89,10 @@ public GroovyScript(SecureGroovyScript script, SecureGroovyScript fallbackScript

private Object readResolve() {
if (script != null) {
secureScript = new SecureGroovyScript(script, false, null);
secureScript = new SecureGroovyScript(script, false, null).configuring(ApprovalContext.create());
}
if (fallbackScript != null) {
secureFallbackScript = new SecureGroovyScript(fallbackScript, false, null);
secureFallbackScript = new SecureGroovyScript(fallbackScript, false, null).configuring(ApprovalContext.create());
}
return this;
}
Expand Down

0 comments on commit 8a0b0b1

Please sign in to comment.