diff --git a/src/main/java/io/jenkins/plugins/autonomiq/AutonomiqBuilder.java b/src/main/java/io/jenkins/plugins/autonomiq/AutonomiqBuilder.java index 5ff9b91..2fa4ade 100644 --- a/src/main/java/io/jenkins/plugins/autonomiq/AutonomiqBuilder.java +++ b/src/main/java/io/jenkins/plugins/autonomiq/AutonomiqBuilder.java @@ -653,6 +653,7 @@ public String getDisplayName() { } @SuppressWarnings("unused") + @POST public ListBoxModel doFillProjectItems(@QueryParameter String aiqUrl, @QueryParameter String login, @QueryParameter Secret password, @@ -661,6 +662,8 @@ public ListBoxModel doFillProjectItems(@QueryParameter String aiqUrl, @QueryParameter String proxyUser, @QueryParameter Secret proxyPassword, @QueryParameter Boolean httpProxy) { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); + // make sure other fields have been filled in if (aiqUrl.length() > 0 && login.length() > 0 && Secret.toString(password).length() > 0) { @@ -681,7 +684,10 @@ public ListBoxModel doFillProjectItems(@QueryParameter String aiqUrl, } @SuppressWarnings("unused") + @POST public ListBoxModel doFillPlatformTestCasesItems() { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); + String[] values = {"Linux"}; //, "Windows"}; @@ -690,7 +696,10 @@ public ListBoxModel doFillPlatformTestCasesItems() { return new ListBoxModel(options); } @SuppressWarnings("unused") + @POST public ListBoxModel doFillPlatformTestSuitesItems() { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); + String[] values = {"Linux"}; //, "Windows"}; @@ -701,7 +710,10 @@ public ListBoxModel doFillPlatformTestSuitesItems() { @SuppressWarnings("unused") + @POST public ListBoxModel doFillBrowserTestCasesItems() { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); + String[] values = {"Chrome", "Firefox"}; @@ -710,7 +722,9 @@ public ListBoxModel doFillBrowserTestCasesItems() { return new ListBoxModel(options); } @SuppressWarnings("unused") + @POST public ListBoxModel doFillBrowserTestSuitesItems() { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); String[] values = {"Chrome", "Firefox"}; @@ -720,7 +734,10 @@ public ListBoxModel doFillBrowserTestSuitesItems() { } @SuppressWarnings("unused") + @POST public ListBoxModel doFillExecutionModeItems() { + Jenkins.get().checkPermission(Jenkins.ADMINISTER); + String[] values = {"serial", "parallel"};