From e9ad7b2473010556487abf23b260952ff3ebe14d Mon Sep 17 00:00:00 2001 From: Ryan Campbell Date: Thu, 31 May 2012 11:21:10 -0500 Subject: [PATCH] Require Jenkins.RUN_SCRIPTS for GroovyshCommand --- core/src/main/java/hudson/cli/GroovyshCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/cli/GroovyshCommand.java b/core/src/main/java/hudson/cli/GroovyshCommand.java index d018b85705..22a20ecd9d 100644 --- a/core/src/main/java/hudson/cli/GroovyshCommand.java +++ b/core/src/main/java/hudson/cli/GroovyshCommand.java @@ -58,7 +58,7 @@ public class GroovyshCommand extends CLICommand { @Override public int main(List args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) { // this allows the caller to manipulate the JVM state, so require the admin privilege. - Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); + Jenkins.getInstance().checkPermission(Jenkins.RUN_SCRIPTS); // TODO: ^as this class overrides main() (which has authentication stuff), // how to get ADMIN permission for this command? -- GitLab