diff --git a/core/src/main/java/hudson/cli/GroovyshCommand.java b/core/src/main/java/hudson/cli/GroovyshCommand.java index d018b857052681612ce2ab01ae4fac58403f6ef4..22a20ecd9dae20ee722ebf9b4ab296f1348391db 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?