Skip to content

Commit

Permalink
Fix compilation with recent script-security plugin versions (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcrespel authored Dec 23, 2024
1 parent a7acd80 commit ee8aceb
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import hudson.Extension;
import hudson.Util;
import hudson.model.Descriptor;
import hudson.model.Descriptor.FormException;
import hudson.util.FormValidation;
import jenkins.model.Jenkins;

Expand All @@ -35,12 +36,12 @@ public class Cas10Protocol extends CasProtocol {
private final SecureGroovyScript secureRolesValidationScript;

@Deprecated
public Cas10Protocol(String rolesValidationScript, String testValidationResponse) {
public Cas10Protocol(String rolesValidationScript, String testValidationResponse) throws FormException {
this(rolesValidationScript, testValidationResponse, false);
}

@DataBoundConstructor
public Cas10Protocol(String rolesValidationScript, String testValidationResponse, boolean sandbox) {
public Cas10Protocol(String rolesValidationScript, String testValidationResponse, boolean sandbox) throws FormException {
super(Cas10RoleParsingTicketValidator.DEFAULT_ROLE_ATTRIBUTE);
this.rolesValidationScript = Util.fixEmptyAndTrim(rolesValidationScript);
this.testValidationResponse = Util.fixEmpty(testValidationResponse);
Expand All @@ -55,7 +56,7 @@ public TicketValidator createTicketValidator(String casServerUrl) {
return ticketValidator;
}

private static SecureGroovyScript getSecureGroovyScript(String script, boolean sandbox) {
private static SecureGroovyScript getSecureGroovyScript(String script, boolean sandbox) throws FormException {
if (script == null) {
return null;
} else {
Expand Down

0 comments on commit ee8aceb

Please sign in to comment.