提交 0643bd7f 编写于 作者: R Ryan Campbell

Require the Jenkins.RUN_SCRIPTS permission for the Maven Probe groovy execution

上级 fe0c718e
......@@ -99,7 +99,7 @@ public final class MavenProbeAction implements Action {
public void doScript( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
// ability to run arbitrary script is dangerous,
// so tie it to the admin access
owner.checkPermission(Jenkins.ADMINISTER);
owner.checkPermission(Jenkins.RUN_SCRIPTS);
String text = req.getParameter("script");
if(text!=null) {
......
......@@ -29,7 +29,9 @@ THE SOFTWARE.
<l:task icon="images/24x24/document.gif" href="systemProperties" title="${%System Properties}" />
<l:task icon="images/24x24/document.gif" href="envVars" title="${%Environment Variables}" />
<l:task icon="images/24x24/document.gif" href="threads" title="${%Thread Dump}" />
<l:task icon="images/24x24/notepad.gif" href="script" title="${%Script Console}" />
<l:hasPermission permission="${app.RUN_SCRIPTS}">
<l:task icon="images/24x24/notepad.gif" href="script" title="${%Script Console}" />
</l:hasPermission>
</l:tasks>
</l:side-panel>
</j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册