提交 b0704554 编写于 作者: K Kohsuke Kawaguchi

permission check needs to happen where the action is.

上级 247a9dd6
......@@ -386,7 +386,6 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
*/
@CLIMethod(name="delete-job")
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException {
checkPermission(DELETE);
requirePOST();
delete();
if (rsp != null) // null for CLI
......@@ -406,6 +405,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
* Deletes this item.
*/
public synchronized void delete() throws IOException, InterruptedException {
checkPermission(DELETE);
performDelete();
if(this instanceof TopLevelItem)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册