public String getIconFileName() { if (!isTagged() && !getACL().hasPermission(getPermission())) return null; return "save.gif"; }
public String getIconFileName() { if(!isTagged() && !getACL().hasPermission(getPermission())) return null; return "save.gif"; }
public String getIconFileName() { if(!isTagged() && !getACL().hasPermission(getPermission())) return null; return "save.gif"; }
/** * Invoked to actually tag the workspace. */ public synchronized void doSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { getACL().checkPermission(getPermission()); MultipartFormDataParser parser = new MultipartFormDataParser(req); Map<SvnInfo, String> newTags = new HashMap<SvnInfo, String>(); int i = -1; for (SvnInfo e : tags.keySet()) { i++; if (tags.size() > 1 && parser.get("tag" + i) == null) continue; // when tags.size()==1, UI won't show the checkbox. newTags.put(e, parser.get("name" + i)); } UserProvidedCredential upc = null; if (parser.get("credential") != null) upc = UserProvidedCredential.fromForm(req, parser); new TagWorkerThread(newTags, upc, parser.get("comment")).start(); rsp.sendRedirect("."); }
/** * Invoked to actually tag the workspace. */ public synchronized void doSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { getACL().checkPermission(getPermission()); MultipartFormDataParser parser = new MultipartFormDataParser(req); Map<SvnInfo,String> newTags = new HashMap<SvnInfo,String>(); int i=-1; for (SvnInfo e : tags.keySet()) { i++; if(tags.size()>1 && parser.get("tag"+i)==null) continue; // when tags.size()==1, UI won't show the checkbox. newTags.put(e,parser.get("name" + i)); } UserProvidedCredential upc=null; if (parser.get("credential")!=null) upc = UserProvidedCredential.fromForm(req,parser); new TagWorkerThread(newTags,upc,parser.get("comment")).start(); rsp.sendRedirect("."); }
getACL().checkPermission(getPermission());
assertFalse("Shouldn't be accessible to anonymous user",b.hasPermission(action.getPermission())); return null; });