提交 50aade69 编写于 作者: K kohsuke

Stapler gets confused which one to invoke for .../script

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17364 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4aad075e
......@@ -669,17 +669,17 @@ public abstract class Computer extends AbstractModelObject implements AccessCont
* Run arbitrary Groovy script.
*/
public void doScript(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doScript(req, rsp, "_script.jelly");
_doScript(req, rsp, "_script.jelly");
}
/**
* Run arbitrary Groovy script and return result as plain text.
*/
public void doScriptText(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doScript(req, rsp, "_scriptText.jelly");
_doScript(req, rsp, "_scriptText.jelly");
}
public void doScript( StaplerRequest req, StaplerResponse rsp, String view) throws IOException, ServletException {
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(Hudson.ADMINISTER);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册