@Restricted(DoNotUse.class) @RequirePOST public void doDoRename(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if (!hasPermission(CONFIGURE)) { // rename is essentially delete followed by a create checkPermission(CREATE); checkPermission(DELETE); } String newName = req.getParameter("newName"); Jenkins.checkGoodName(newName); String blocker = renameBlocker(); if (blocker != null) { rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8") + "&blocker=" + URLEncoder.encode(blocker, "UTF-8")); return; } renameTo(newName); rsp.sendRedirect2("../" + newName); }