From 6dfd8db3c2d70d45d901da9eccb52e3f49d90bfb Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 17 Aug 2012 11:35:01 +0200 Subject: [PATCH] require RUN_SCRIPTS permission to run scripts onn node --- core/src/main/java/hudson/model/Computer.java | 5 ++--- .../src/main/resources/hudson/model/Computer/sidepanel.jelly | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 32668d496b..1890b8819e 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1052,9 +1052,8 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces } protected void _doScript( StaplerRequest req, StaplerResponse rsp, String view) throws IOException, ServletException { - // ability to run arbitrary script is dangerous, - // so tie it to the admin access - checkPermission(Jenkins.ADMINISTER); + // ability to run arbitrary script is dangerous + checkPermission(Jenkins.RUN_SCRIPTS); String text = req.getParameter("script"); if(text!=null) { diff --git a/core/src/main/resources/hudson/model/Computer/sidepanel.jelly b/core/src/main/resources/hudson/model/Computer/sidepanel.jelly index 64b93ef53e..059880771d 100644 --- a/core/src/main/resources/hudson/model/Computer/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/Computer/sidepanel.jelly @@ -36,7 +36,7 @@ THE SOFTWARE. - +