/** * For binding {@link LogRecorderManager} to "/log". * Everything below here is admin-only, so do the check here. */ public LogRecorderManager getLog() { checkPermission(ADMINISTER); return log; }
/** * For binding {@link LogRecorderManager} to "/log". Everything below here * is admin-only, so do the check here. */ public LogRecorderManager getLog() { checkPermission(ADMINISTER); return log; }
public HttpResponse doPin() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); new FileOutputStream(pinFile).close(); return HttpResponses.ok(); }
public HttpResponse doPin() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); new FileOutputStream(pinFile).close(); return HttpResponses.ok(); }
public HttpResponse doPin() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); new FileOutputStream(pinFile).close(); return HttpResponses.ok(); }
public HttpResponse doUnpin() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); pinFile.delete(); return HttpResponses.ok(); }
/** * For debugging. Expose URL to perform GC. */ public void doGc(StaplerResponse rsp) throws IOException { checkPermission(Hudson.ADMINISTER); System.gc(); rsp.setStatus(HttpServletResponse.SC_OK); rsp.setContentType("text/plain"); rsp.getWriter().println("GCed"); }
protected int run() throws Exception { Hudson h = Hudson.getInstance(); h.checkPermission(Item.CREATE); if (h.getItem(name)!=null) { stderr.println("Job '"+name+"' already exists"); return -1; } h.createProjectFromXML(name,stdin); return 0; } }
protected int run() throws Exception { Hudson h = Hudson.getInstance(); h.checkPermission(Item.CREATE); if (h.getItem(name)!=null) { stderr.println("Job '"+name+"' already exists"); return -1; } h.createProjectFromXML(name,stdin); return 0; } }
public HttpResponse doMakeEnabled() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); enable(); return HttpResponses.ok(); }
public HttpResponse doMakeDisabled() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); disable(); return HttpResponses.ok(); }
public HttpResponse doMakeEnabled() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); enable(); return HttpResponses.ok(); }
public HttpResponse doMakeEnabled() throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); enable(); return HttpResponses.ok(); }
/** * URL binding to disable this monitor. */ public void doDisable(StaplerRequest req, StaplerResponse rsp) throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); disable(true); rsp.sendRedirect2(req.getContextPath()+"/manage"); }
@CLIMethod(name = "cancel-quiet-down") public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
public void doUpdateBuildStatConfiguration(StaplerRequest req, StaplerResponse res) throws ServletException, IOException { Hudson.getInstance().checkPermission(getRequiredPermission()); boolean regenerateId = Boolean.valueOf(req.getParameter("regenerateId")).booleanValue(); BuildStatConfiguration config = FromRequestObjectFactory.createBuildStatConfiguration(req.getParameter("buildStatId"), req); business.updateBuildStatConfiguration(req.getParameter("buildStatId"), config, regenerateId); String json = JSONObject.fromObject(config).toString(); res.getWriter().write(json); }
public void do_launchAll(StaplerRequest req, StaplerResponse rsp) throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for(Computer c : get_all()) { if(c.isLaunchSupported()) c.connect(true); } rsp.sendRedirect("."); }
public void do_launchAll(StaplerRequest req, StaplerResponse rsp) throws IOException { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for(Computer c : get_all()) { if(c.isLaunchSupported()) c.connect(true); } rsp.sendRedirect("."); }
/** * Schedules the downgrade of this plugin. */ public Future<UpdateCenterJob> deployBackup() { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); UpdateCenter uc = Hudson.getInstance().getUpdateCenter(); return uc.addJob(uc.new PluginDowngradeJob(this, UpdateSite.this, HudsonSecurityManager.getAuthentication())); }
/** * Accepts the update to the node configuration. */ public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Hudson app = Hudson.getInstance(); app.checkPermission(Hudson.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); updateTransientActions(); save(); // take the user back to the label top page. rsp.sendRedirect2("."); }