diff --git a/.idea/compiler.xml b/.idea/compiler.xml index ceccd3d645..7c9af026e3 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -5,8 +5,6 @@ - - @@ -42,8 +40,6 @@ - - @@ -54,7 +50,6 @@ - diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 8b72c68c7d..bb7dc2c6f1 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -7,7 +7,6 @@ - diff --git a/.idea/groovyc.xml b/.idea/groovyc.xml index c24d9163c1..117b3f5aa7 100644 --- a/.idea/groovyc.xml +++ b/.idea/groovyc.xml @@ -4,7 +4,6 @@ - diff --git a/changelog.html b/changelog.html index d364fd33fc..dcbe31fa32 100644 --- a/changelog.html +++ b/changelog.html @@ -54,6 +54,99 @@ Upcoming changes + + + +

What's new in 1.534 (2013/10/07)

+
    +
  • + Default crumb issuer configurations saved in older releases did not load as of Jenkins 1.531. + (issue 19613) +
  • + As of 1.532 download of artifact ZIPs was broken. + (issue 19752) +
  • + Old copies of maven3-agent.jar on slaves were not being reliably updated, leading to errors. + (issue 19251) +
  • + Add option to disable "Remember me on this computer" checkbox in login screen. + (issue 15757) +
  • + Added postCheckout method for SCMs + (issue 19740) +
+

What's new in 1.533 (2013/09/29)

+
    +
  • + Offer alternate error message for pattern-based project naming strategy. + (pull request 914) +
+

What's new in 1.532 (2013/09/23)

+
    +
  • + Working around a GZip compression bug in jzlib affecting transfer of certain large, repetitive artifacts. + (issue 19473) +
  • + Lazy-loading bug: builds go missing. + (issue 19418) +
  • + (re)create build number->id symlink if missing when updating permalink. + (issue 19034) +
  • + Display the full display name in title for jobs and views. + (pull request 884) +
  • + Added a new extension point to control where archived artifacts get stored. + (issue 17236) +
  • + Use fine-grained permissions for node manipulation via REST API & CLI + (issue 18485) +
  • + Make the link to the aggregated test result from the project page work. + (issue 9637) +
+

What's new in 1.531 (2013/09/16)

  • Deleting an external run did not immediately remove it from build list, leading to errors from log rotation. @@ -61,15 +154,26 @@ Upcoming changes
  • When copying a directory from master to slave fails due to an error on the slave, properly report it. (issue 9540) +
  • + Identify user agent for Internet Explorer 11. + (issue 19171) +
  • + Since 1.518, fingerprint serialization broke when job or file names contained XML special characters like ampersands. + (issue 18337) +
  • + Robustness against truncated fingerprint files. + (issue 19515) +
  • + JavaScript error in the checkUrl computation shouldn't break the job configuration page. + (issue 19457)
  • Annotate the Advanced section if some fields are already customized. (issue 3107) +
  • + No events fired when project is enable/disable or the description is changed + (issue 17108)
- - - -

What's new in 1.529 (2013/08/26)

  • @@ -149,6 +252,9 @@ Upcoming changes

What's new in 1.526 (2013/08/05)

    +
  • + HudsonAuthenticationEntryPoint can break CLI support, because the port isn't exposed properly. + (issue 18634)
  • Report an user friendly error page if a deletion of a build fails. (pull request 827) diff --git a/cli/pom.xml b/cli/pom.xml index cc545d69d7..409c51dc53 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ pom org.jenkins-ci.main - 1.531-SNAPSHOT + 1.536-SNAPSHOT cli diff --git a/cli/src/main/java/hudson/cli/NoCheckTrustManager.java b/cli/src/main/java/hudson/cli/NoCheckTrustManager.java index 0aeaf9e024..c69b3330c2 100644 --- a/cli/src/main/java/hudson/cli/NoCheckTrustManager.java +++ b/cli/src/main/java/hudson/cli/NoCheckTrustManager.java @@ -1,13 +1,13 @@ package hudson.cli; -import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; /** * @author Kohsuke Kawaguchi */ -public class NoCheckTrustManager implements TrustManager { +public class NoCheckTrustManager implements X509TrustManager { public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { } diff --git a/core/pom.xml b/core/pom.xml index 51313a70c1..29f8eb6bc7 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.531-SNAPSHOT + 1.536-SNAPSHOT ../pom.xml @@ -91,6 +91,7 @@ THE SOFTWARE. com.google.inject guice + no_aop @@ -101,7 +102,7 @@ THE SOFTWARE. com.github.jnr jnr-posix - 3.0.0 + 3.0.1 org.kohsuke @@ -523,7 +524,7 @@ THE SOFTWARE. org.jenkins-ci windows-remote-command - 1.3 + 1.4 org.kohsuke.metainf-services @@ -582,6 +583,12 @@ THE SOFTWARE. com.google.guava guava + + + com.jcraft + jzlib + 1.1.3 + diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java index e4d158128c..db9ed76603 100644 --- a/core/src/main/java/hudson/ClassicPluginStrategy.java +++ b/core/src/main/java/hudson/ClassicPluginStrategy.java @@ -272,7 +272,8 @@ public class ClassicPluginStrategy implements PluginStrategy { new DetachedPlugin("external-monitor-job","1.467.*","1.0"), new DetachedPlugin("ldap","1.467.*","1.0"), new DetachedPlugin("pam-auth","1.467.*","1.0"), - new DetachedPlugin("mailer","1.493.*","1.2") + new DetachedPlugin("mailer","1.493.*","1.2"), + new DetachedPlugin("matrix-auth","1.535.*","1.0.2") ); /** diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 7bba63d3f7..15da9ead87 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -27,6 +27,7 @@ package hudson; import hudson.Launcher.LocalLauncher; import hudson.Launcher.RemoteLauncher; +import hudson.os.PosixAPI; import jenkins.model.Jenkins; import hudson.model.TaskListener; import hudson.model.AbstractProject; @@ -48,15 +49,13 @@ import hudson.util.FormValidation; import hudson.util.IOUtils; import static hudson.Util.*; -import static hudson.util.jna.GNUCLibrary.LIBC; import static hudson.FilePath.TarCompression.GZIP; import hudson.org.apache.tools.tar.TarInputStream; import hudson.util.io.Archiver; import hudson.util.io.ArchiverFactory; -import org.apache.tools.ant.BuildException; +import jenkins.util.VirtualFile; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; -import org.apache.tools.ant.taskdefs.Copy; import org.apache.tools.ant.types.FileSet; import org.apache.tools.tar.TarEntry; import org.apache.commons.io.input.CountingInputStream; @@ -98,8 +97,10 @@ import com.jcraft.jzlib.GZIPOutputStream; import com.sun.jna.Native; import hudson.os.PosixException; -import java.io.BufferedInputStream; +import hudson.util.FileVisitor; import java.util.Enumeration; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; import org.apache.tools.ant.taskdefs.Chmod; @@ -169,6 +170,7 @@ import org.apache.tools.zip.ZipEntry; * {@link FilePath} that represents the local computer causes it to become "remote." * * @author Kohsuke Kawaguchi + * @see VirtualFile */ public final class FilePath implements Serializable { /** @@ -197,7 +199,7 @@ public final class FilePath implements Serializable { * that's connected to that machine. If null, that means the local file path. */ public FilePath(VirtualChannel channel, String remote) { - this.channel = channel; + this.channel = channel == Jenkins.MasterComputer.localChannel ? null : channel; this.remote = normalize(remote); } @@ -239,10 +241,11 @@ public final class FilePath implements Serializable { * Is the given path name an absolute path? */ private static boolean isAbsolute(String rel) { - return rel.startsWith("/") || DRIVE_PATTERN.matcher(rel).matches(); + return rel.startsWith("/") || DRIVE_PATTERN.matcher(rel).matches() || UNC_PATTERN.matcher(rel).matches(); } private static final Pattern DRIVE_PATTERN = Pattern.compile("[A-Za-z]:[\\\\/].*"), + UNC_PATTERN = Pattern.compile("^\\\\\\\\.*"), ABSOLUTE_PREFIX_PATTERN = Pattern.compile("^(\\\\\\\\|(?:[A-Za-z]:)?[\\\\/])[\\\\/]*"); /** @@ -1036,6 +1039,15 @@ public final class FilePath implements Serializable { }); } + /** + * Gets the {@link VirtualFile} representation of this {@link FilePath} + * + * @since 1.532 + */ + public VirtualFile toVirtualFile() { + return VirtualFile.forFilePath(this); + } + /** * Creates this directory. */ @@ -1420,32 +1432,12 @@ public final class FilePath implements Serializable { } /** - * Run chmod via libc if we can, otherwise fall back to Ant. + * Run chmod via jnr-posix */ private static void _chmod(File f, int mask) throws IOException { if (Functions.isWindows()) return; // noop - try { - if(LIBC.chmod(f.getAbsolutePath(),mask)!=0) { - throw new IOException("Failed to chmod "+f+" : "+LIBC.strerror(Native.getLastError())); - } - } catch(NoClassDefFoundError e) { // cf. https://groups.google.com/group/hudson-dev/browse_thread/thread/6d16c3e8ea0dbc9?hl=fr - _chmodAnt(f, mask); - } catch(UnsatisfiedLinkError e2) { // HUDSON-8155: use Ant's chmod task on non-GNU C systems - _chmodAnt(f, mask); - } - } - - private static void _chmodAnt(File f, int mask) { - if (!CHMOD_WARNED) { // only warn this once to avoid flooding the log - CHMOD_WARNED = true; - LOGGER.warning("GNU C Library not available: Using Ant's chmod task instead."); - } - Chmod chmodTask = new Chmod(); - chmodTask.setProject(new Project()); - chmodTask.setFile(f); - chmodTask.setPerm(Integer.toOctalString(mask)); - chmodTask.execute(); + PosixAPI.jnr().chmod(f.getAbsolutePath(),mask); } private static boolean CHMOD_WARNED = false; @@ -1875,6 +1867,18 @@ public final class FilePath implements Serializable { * the number of files copied. */ public int copyRecursiveTo(final String fileMask, final String excludes, final FilePath target) throws IOException, InterruptedException { + return copyRecursiveTo(new DirScanner.Glob(fileMask, excludes), target, fileMask); + } + + /** + * Copies files according to a specified scanner to a target node. + * @param scanner a way of enumerating some files (must be serializable for possible delivery to remote side) + * @param target the destination basedir + * @param description a description of the fileset, for logging purposes + * @return the number of files copied + * @since 1.532 + */ + public int copyRecursiveTo(final DirScanner scanner, final FilePath target, final String description) throws IOException, InterruptedException { if(this.channel==target.channel) { // local to local copy. return act(new FileCallable() { @@ -1882,37 +1886,30 @@ public final class FilePath implements Serializable { public Integer invoke(File base, VirtualChannel channel) throws IOException { if(!base.exists()) return 0; assert target.channel==null; - - try { - class CopyImpl extends Copy { - private int copySize; - - public CopyImpl() { - setProject(new org.apache.tools.ant.Project()); - } - - @Override - protected void doFileOperations() { - copySize = super.fileCopyMap.size(); - super.doFileOperations(); - } - - public int getNumCopied() { - return copySize; + final File dest = new File(target.remote); + final AtomicInteger count = new AtomicInteger(); + scanner.scan(base, new FileVisitor() { + @Override public void visit(File f, String relativePath) throws IOException { + if (f.isFile()) { + File target = new File(dest, relativePath); + target.getParentFile().mkdirs(); + Util.copyFile(f, target); + count.incrementAndGet(); } } - - CopyImpl copyTask = new CopyImpl(); - copyTask.setTodir(new File(target.remote)); - copyTask.addFileset(Util.createFileSet(base,fileMask,excludes)); - copyTask.setOverwrite(true); - copyTask.setIncludeEmptyDirs(false); - - copyTask.execute(); - return copyTask.getNumCopied(); - } catch (BuildException e) { - throw new IOException2("Failed to copy "+base+"/"+fileMask+" to "+target,e); - } + @Override public boolean understandsSymlink() { + return true; + } + @Override public void visitSymlink(File link, String target, String relativePath) throws IOException { + try { + Util.createSymlink(dest, target, relativePath, TaskListener.NULL); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + count.incrementAndGet(); + } + }); + return count.get(); } }); } else @@ -1924,7 +1921,7 @@ public final class FilePath implements Serializable { private static final long serialVersionUID = 1L; public Void invoke(File f, VirtualChannel channel) throws IOException { try { - readFromTar(remote+'/'+fileMask, f,TarCompression.GZIP.extract(pipe.getIn())); + readFromTar(remote + '/' + description, f,TarCompression.GZIP.extract(pipe.getIn())); return null; } finally { pipe.getIn().close(); @@ -1934,7 +1931,7 @@ public final class FilePath implements Serializable { Future future2 = actAsync(new FileCallable() { private static final long serialVersionUID = 1L; @Override public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { - return writeToTar(new File(remote),fileMask,excludes,TarCompression.GZIP.compress(pipe.getOut())); + return writeToTar(new File(remote), scanner, TarCompression.GZIP.compress(pipe.getOut())); } }); try { @@ -1952,14 +1949,14 @@ public final class FilePath implements Serializable { private static final long serialVersionUID = 1L; public Integer invoke(File f, VirtualChannel channel) throws IOException { try { - return writeToTar(f,fileMask,excludes,TarCompression.GZIP.compress(pipe.getOut())); + return writeToTar(f, scanner, TarCompression.GZIP.compress(pipe.getOut())); } finally { pipe.getOut().close(); } } }); try { - readFromTar(remote+'/'+fileMask,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn())); + readFromTar(remote + '/' + description,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn())); } catch (IOException e) {// BuildException or IOException try { future.get(3,TimeUnit.SECONDS); @@ -2008,10 +2005,10 @@ public final class FilePath implements Serializable { * @return * number of files/directories that are written. */ - private static Integer writeToTar(File baseDir, String fileMask, String excludes, OutputStream out) throws IOException { + private static Integer writeToTar(File baseDir, DirScanner scanner, OutputStream out) throws IOException { Archiver tw = ArchiverFactory.TAR.create(out); try { - new DirScanner.Glob(fileMask,excludes).scan(baseDir,tw); + scanner.scan(baseDir,tw); } finally { tw.close(); } @@ -2474,4 +2471,35 @@ public final class FilePath implements Serializable { } }); } + + /** + * Helper class to make it easy to send an explicit list of files using {@link FilePath} methods. + * @since 1.532 + */ + public static final class ExplicitlySpecifiedDirScanner extends DirScanner { + + private static final long serialVersionUID = 1; + + private final Map files; + + /** + * Create a “scanner” (it actually does no scanning). + * @param files a map from logical relative paths as per {@link FileVisitor#visit}, to actual relative paths within the scanned directory + */ + public ExplicitlySpecifiedDirScanner(Map files) { + this.files = files; + } + + @Override public void scan(File dir, FileVisitor visitor) throws IOException { + for (Map.Entry entry : files.entrySet()) { + String archivedPath = entry.getKey(); + assert archivedPath.indexOf('\\') == -1; + String workspacePath = entry.getValue(); + assert workspacePath.indexOf('\\') == -1; + scanSingle(new File(dir, workspacePath), archivedPath, visitor); + } + } + + } + } diff --git a/core/src/main/java/hudson/Launcher.java b/core/src/main/java/hudson/Launcher.java index aeb2c15227..382e850bbd 100644 --- a/core/src/main/java/hudson/Launcher.java +++ b/core/src/main/java/hudson/Launcher.java @@ -1087,6 +1087,9 @@ public abstract class Launcher { */ private static EnvVars inherit(Map overrides) { EnvVars m = new EnvVars(EnvVars.masterEnvVars); + // first add all values and then eventually expand them as values can refer other newly added values (see JENKINS-19488) + for (Map.Entry o : overrides.entrySet()) + m.override(o.getKey(),o.getValue()); for (Map.Entry o : overrides.entrySet()) m.override(o.getKey(),m.expand(o.getValue())); return m; diff --git a/core/src/main/java/hudson/cli/BuildCommand.java b/core/src/main/java/hudson/cli/BuildCommand.java index 75a1000bee..b6712ccdbb 100644 --- a/core/src/main/java/hudson/cli/BuildCommand.java +++ b/core/src/main/java/hudson/cli/BuildCommand.java @@ -33,8 +33,8 @@ import hudson.model.ParametersDefinitionProperty; import hudson.model.ParameterDefinition; import hudson.Extension; import hudson.AbortException; -import hudson.console.ModelHyperlinkNote; import hudson.model.Item; +import hudson.model.Result; import hudson.model.TaskListener; import hudson.model.queue.QueueTaskFuture; import hudson.scm.PollingResult.Change; @@ -43,7 +43,6 @@ import hudson.util.StreamTaskListener; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; -import java.io.IOException; import java.util.Map; import java.util.HashMap; import java.util.List; @@ -51,7 +50,6 @@ import java.util.ArrayList; import java.util.Map.Entry; import java.io.FileNotFoundException; import java.io.PrintStream; -import java.util.concurrent.ExecutionException; import jenkins.model.Jenkins; @@ -70,7 +68,10 @@ public class BuildCommand extends CLICommand { @Argument(metaVar="JOB",usage="Name of the job to build",required=true) public AbstractProject job; - @Option(name="-s",usage="Wait until the completion/abortion of the command") + @Option(name="-f", usage="Follow the build progress. Like -s only interrupts are not passed through to the build.") + public boolean follow = false; + + @Option(name="-s",usage="Wait until the completion/abortion of the command. Interrupts are passed through to the build.") public boolean sync = false; @Option(name="-w",usage="Wait until the start of the command") @@ -139,11 +140,11 @@ public class BuildCommand extends CLICommand { QueueTaskFuture f = job.scheduleBuild2(0, new CLICause(Jenkins.getAuthentication().getName()), a); - if (wait || sync) { + if (wait || sync || follow) { AbstractBuild b = f.waitForStart(); // wait for the start stdout.println("Started "+b.getFullDisplayName()); - if (sync) { + if (sync || follow) { try { if (consoleOutput) { // read output in a retry loop, by default try only once @@ -169,9 +170,13 @@ public class BuildCommand extends CLICommand { stdout.println("Completed "+b.getFullDisplayName()+" : "+b.getResult()); return b.getResult().ordinal; } catch (InterruptedException e) { - // if the CLI is aborted, try to abort the build as well - f.cancel(true); - throw e; + if (follow) { + return 125; + } else { + // if the CLI is aborted, try to abort the build as well + f.cancel(true); + throw e; + } } } } @@ -186,7 +191,12 @@ public class BuildCommand extends CLICommand { "Aside from general scripting use, this command can be\n" + "used to invoke another job from within a build of one job.\n" + "With the -s option, this command changes the exit code based on\n" + - "the outcome of the build (exit code 0 indicates a success.)\n" + + "the outcome of the build (exit code 0 indicates a success)\n" + + "and interrupting the command will interrupt the job.\n" + + "With the -f option, this command changes the exit code based on\n" + + "the outcome of the build (exit code 0 indicates a success)\n" + + "however, unlike -s, interrupting the command will not interrupt\n" + + "the job (exit code 125 indicates the command was interrupted)\n" + "With the -c option, a build will only run if there has been\n" + "an SCM change" ); diff --git a/core/src/main/java/hudson/cli/CreateNodeCommand.java b/core/src/main/java/hudson/cli/CreateNodeCommand.java index bd94932955..b7ccac632f 100644 --- a/core/src/main/java/hudson/cli/CreateNodeCommand.java +++ b/core/src/main/java/hudson/cli/CreateNodeCommand.java @@ -25,6 +25,7 @@ package hudson.cli; import hudson.Extension; +import hudson.model.Computer; import hudson.model.Node; import hudson.model.Slave; import hudson.model.User; @@ -35,7 +36,7 @@ import org.kohsuke.args4j.CmdLineException; /** * @author ogondza - * @since XXX + * @since 1.526 */ @Extension public class CreateNodeCommand extends CLICommand { @@ -53,7 +54,7 @@ public class CreateNodeCommand extends CLICommand { protected int run() throws Exception { final Jenkins jenkins = Jenkins.getInstance(); - jenkins.checkPermission(Jenkins.ADMINISTER); + jenkins.checkPermission(Computer.CREATE); final Node newNode = (Node) Jenkins.XSTREAM2.fromXML(stdin); diff --git a/core/src/main/java/hudson/cli/GetNodeCommand.java b/core/src/main/java/hudson/cli/GetNodeCommand.java index e2bf3410da..15df13bcd9 100644 --- a/core/src/main/java/hudson/cli/GetNodeCommand.java +++ b/core/src/main/java/hudson/cli/GetNodeCommand.java @@ -24,6 +24,7 @@ package hudson.cli; import hudson.Extension; +import hudson.model.Computer; import hudson.model.Node; import java.io.IOException; @@ -34,7 +35,7 @@ import org.kohsuke.args4j.Argument; /** * @author ogondza - * @since XXX + * @since 1.526 */ @Extension public class GetNodeCommand extends CLICommand { @@ -51,7 +52,7 @@ public class GetNodeCommand extends CLICommand { @Override protected int run() throws IOException { - node.checkPermission(Jenkins.ADMINISTER); + node.checkPermission(Computer.EXTENDED_READ); Jenkins.XSTREAM2.toXMLUTF8(node, stdout); diff --git a/core/src/main/java/hudson/cli/UpdateNodeCommand.java b/core/src/main/java/hudson/cli/UpdateNodeCommand.java index 5af2b54eb8..ee56fdfd8e 100644 --- a/core/src/main/java/hudson/cli/UpdateNodeCommand.java +++ b/core/src/main/java/hudson/cli/UpdateNodeCommand.java @@ -35,7 +35,7 @@ import org.kohsuke.args4j.Argument; /** * @author ogondza - * @since XXX + * @since 1.526 */ @Extension public class UpdateNodeCommand extends CLICommand { diff --git a/core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java b/core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java index 24e7a5aed6..516f1e6ed4 100644 --- a/core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java +++ b/core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java @@ -38,7 +38,7 @@ import org.kohsuke.args4j.spi.Setter; * Refers to {@link Node} by its name. * * @author ogondza - * @since XXX + * @since 1.526 */ @MetaInfServices public class NodeOptionHandler extends OptionHandler { diff --git a/core/src/main/java/hudson/matrix/LinkedLogRotator.java b/core/src/main/java/hudson/matrix/LinkedLogRotator.java index 4f3d62a5d5..c46870318e 100644 --- a/core/src/main/java/hudson/matrix/LinkedLogRotator.java +++ b/core/src/main/java/hudson/matrix/LinkedLogRotator.java @@ -27,6 +27,7 @@ import hudson.model.Job; import hudson.tasks.LogRotator; import java.io.IOException; +import java.util.logging.Logger; /** * {@link LogRotator} for {@link MatrixConfiguration}, @@ -60,11 +61,17 @@ final class LinkedLogRotator extends LogRotator { // copy it to the array because we'll be deleting builds as we go. for( MatrixRun r : job.getBuilds().toArray(new MatrixRun[0]) ) { - if(job.getParent().getBuildByNumber(r.getNumber())==null) + if(job.getParent().getBuildByNumber(r.getNumber())==null) { + LOGGER.fine("Deleting "+r.getFullDisplayName()); r.delete(); + } } - if(!job.isActiveConfiguration() && job.getLastBuild()==null) + if(!job.isActiveConfiguration() && job.getLastBuild()==null) { + LOGGER.fine("Deleting "+job.getFullDisplayName()+" because the configuration is inactive and there's no builds"); job.delete(); + } } + + private static final Logger LOGGER = Logger.getLogger(LinkedLogRotator.class.getName()); } diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index 522cc47829..bbc7f54198 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -162,10 +162,13 @@ public abstract class AbstractBuild

    ,R extends Abs *

    * Unlike {@link Run}, {@link AbstractBuild}s do lazy-loading, so we don't use * {@link Run#previousBuild} and {@link Run#nextBuild}, and instead use these - * fields and point to {@link #selfReference} of adjacent builds. + * fields and point to {@link #selfReference} (or {@link #none}) of adjacent builds. */ private volatile transient BuildReference previousBuild, nextBuild; + @SuppressWarnings({"unchecked", "rawtypes"}) private static final BuildReference NONE = new BuildReference("NONE", null); + @SuppressWarnings("unchecked") private BuildReference none() {return NONE;} + /*package*/ final transient BuildReference selfReference = new BuildReference(getId(),_this()); @@ -193,11 +196,7 @@ public abstract class AbstractBuild

    ,R extends Abs if(nextBuild!=null) { AbstractBuild nb = nextBuild.get(); if (nb!=null) { - // remove the oldest build - if (previousBuild == selfReference) - nb.previousBuild = nextBuild; - else - nb.previousBuild = previousBuild; + nb.previousBuild = previousBuild; } } if(previousBuild!=null) { @@ -223,13 +222,11 @@ public abstract class AbstractBuild

    ,R extends Abs this.previousBuild = pb.selfReference; return pb; } else { - // this indicates that we know there's no previous build - // (as opposed to we don't know if/what our previous build is. - this.previousBuild = selfReference; + this.previousBuild = none(); return null; } } - if (r==selfReference) + if (r==none()) return null; R referent = r.get(); @@ -253,13 +250,11 @@ public abstract class AbstractBuild

    ,R extends Abs this.nextBuild = nb.selfReference; return nb; } else { - // this indicates that we know there's no next build - // (as opposed to we don't know if/what our next build is. - this.nextBuild = selfReference; + this.nextBuild = none(); return null; } } - if (r==selfReference) + if (r==none()) return null; R referent = r.get(); @@ -667,6 +662,10 @@ public abstract class AbstractBuild

    ,R extends Abs } catch (Exception e) { throw new IOException2("Failed to parse changelog",e); } + + // Get a chance to do something after checkout and changelog is done + scm.postCheckout( build, launcher, build.getWorkspace(), listener ); + return; } } catch (AbortException e) { diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java index 518234e652..6419fc2b45 100644 --- a/core/src/main/java/hudson/model/AbstractItem.java +++ b/core/src/main/java/hudson/model/AbstractItem.java @@ -183,6 +183,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet public void setDescription(String description) throws IOException { this.description = description; save(); + ItemListener.fireOnUpdated(this); } /** diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 6a5cc387f5..a1f9eb8d0e 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -53,6 +53,7 @@ import hudson.model.queue.SubTask; import hudson.model.RunMap.Constructor; import hudson.model.labels.LabelAtom; import hudson.model.labels.LabelExpression; +import hudson.model.listeners.ItemListener; import hudson.model.listeners.SCMPollListener; import hudson.model.queue.CauseOfBlockage; import hudson.model.queue.SubTaskContributor; @@ -702,7 +703,9 @@ public abstract class AbstractProject

    ,R extends A this.disabled = b; if(b) Jenkins.getInstance().getQueue().cancel(this); + save(); + ItemListener.fireOnUpdated(this); } /** @@ -2050,7 +2053,7 @@ public abstract class AbstractProject

    ,R extends A * Serves the workspace files. */ public DirectoryBrowserSupport doWs( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { - checkPermission(AbstractProject.WORKSPACE); + checkPermission(Item.WORKSPACE); FilePath ws = getSomeWorkspace(); if ((ws == null) || (!ws.exists())) { // if there's no workspace, report a nice error message diff --git a/core/src/main/java/hudson/model/AllView.java b/core/src/main/java/hudson/model/AllView.java index 5d9b235769..0bc73d3c58 100644 --- a/core/src/main/java/hudson/model/AllView.java +++ b/core/src/main/java/hudson/model/AllView.java @@ -23,7 +23,6 @@ */ package hudson.model; -import jenkins.model.Jenkins; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest; @@ -53,11 +52,6 @@ public class AllView extends View { this.owner = owner; } - @Override - public String getDescription() { - return Jenkins.getInstance().getDescription(); - } - @Override public boolean isEditable() { return false; @@ -82,14 +76,6 @@ public class AllView extends View { return (Collection)getOwnerItemGroup().getItems(); } - @Override - public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { - checkPermission(Jenkins.ADMINISTER); - - Jenkins.getInstance().setSystemMessage(req.getParameter("description")); - rsp.sendRedirect("."); - } - @Override public String getPostConstructLandingPage() { return ""; // there's no configuration page diff --git a/core/src/main/java/hudson/model/BuildAuthorizationToken.java b/core/src/main/java/hudson/model/BuildAuthorizationToken.java index 8d4483ba08..1fba190925 100644 --- a/core/src/main/java/hudson/model/BuildAuthorizationToken.java +++ b/core/src/main/java/hudson/model/BuildAuthorizationToken.java @@ -75,7 +75,7 @@ public final class BuildAuthorizationToken { throw new AccessDeniedException(Messages.BuildAuthorizationToken_InvalidTokenProvided()); } - project.checkPermission(AbstractProject.BUILD); + project.checkPermission(Item.BUILD); if (req.getMethod().equals("POST")) { return; diff --git a/core/src/main/java/hudson/model/BuildVariableContributor.java b/core/src/main/java/hudson/model/BuildVariableContributor.java index 35c4935789..23b6632644 100644 --- a/core/src/main/java/hudson/model/BuildVariableContributor.java +++ b/core/src/main/java/hudson/model/BuildVariableContributor.java @@ -67,7 +67,7 @@ public abstract class BuildVariableContributor implements ExtensionPoint { public abstract void buildVariablesFor(AbstractBuild build, Map variables); /** - * Returns all the registered {@link EnvironmentContributor}s. + * Returns all the registered {@link BuildVariableContributor}s. */ public static ExtensionList all() { return Jenkins.getInstance().getExtensionList(BuildVariableContributor.class); diff --git a/core/src/main/java/hudson/model/CauseAction.java b/core/src/main/java/hudson/model/CauseAction.java index c3a967932b..38b5f6284a 100644 --- a/core/src/main/java/hudson/model/CauseAction.java +++ b/core/src/main/java/hudson/model/CauseAction.java @@ -32,6 +32,8 @@ import org.kohsuke.stapler.export.ExportedBean; import com.thoughtworks.xstream.converters.UnmarshallingContext; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -51,7 +53,15 @@ public class CauseAction implements FoldableAction, RunAction2 { public CauseAction(Cause c) { this.causes.add(c); } - + + public CauseAction(Cause... c) { + this(Arrays.asList(c)); + } + + public CauseAction(Collection causes) { + this.causes.addAll(causes); + } + public CauseAction(CauseAction ca) { this.causes.addAll(ca.causes); } diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 1deb50cecb..e919e91838 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1198,9 +1198,10 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces @WebMethod(name = "config.xml") public void doConfigDotXml(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { - checkPermission(Jenkins.ADMINISTER); + if (req.getMethod().equals("GET")) { // read + checkPermission(EXTENDED_READ); rsp.setContentType("application/xml"); Jenkins.XSTREAM2.toXMLUTF8(getNode(), rsp.getOutputStream()); return; @@ -1237,10 +1238,10 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces /** * Updates Job by its XML definition. * - * @since XXX + * @since 1.526 */ public void updateByXml(final InputStream source) throws IOException, ServletException { - checkPermission(Jenkins.ADMINISTER); + checkPermission(CONFIGURE); Node result = (Node)Jenkins.XSTREAM2.fromXML(source); replaceBy(result); } @@ -1361,10 +1362,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces } public static final PermissionGroup PERMISSIONS = new PermissionGroup(Computer.class,Messages._Computer_Permissions_Title()); - /** - * Permission to configure slaves. - */ public static final Permission CONFIGURE = new Permission(PERMISSIONS,"Configure", Messages._Computer_ConfigurePermission_Description(), Permission.CONFIGURE, PermissionScope.COMPUTER); + /** + * @since 1.532 + */ + public static final Permission EXTENDED_READ = new Permission(PERMISSIONS,"ExtendedRead", Messages._Computer_ExtendedReadPermission_Description(), CONFIGURE, Boolean.getBoolean("hudson.security.ExtendedReadPermission"), new PermissionScope[]{PermissionScope.COMPUTER}); public static final Permission DELETE = new Permission(PERMISSIONS,"Delete", Messages._Computer_DeletePermission_Description(), Permission.DELETE, PermissionScope.COMPUTER); public static final Permission CREATE = new Permission(PERMISSIONS,"Create", Messages._Computer_CreatePermission_Description(), Permission.CREATE, PermissionScope.COMPUTER); public static final Permission DISCONNECT = new Permission(PERMISSIONS,"Disconnect", Messages._Computer_DisconnectPermission_Description(), Jenkins.ADMINISTER, PermissionScope.COMPUTER); diff --git a/core/src/main/java/hudson/model/DirectoryBrowserSupport.java b/core/src/main/java/hudson/model/DirectoryBrowserSupport.java index d924710c76..09e07bed2d 100644 --- a/core/src/main/java/hudson/model/DirectoryBrowserSupport.java +++ b/core/src/main/java/hudson/model/DirectoryBrowserSupport.java @@ -26,19 +26,13 @@ package hudson.model; import hudson.FilePath; import hudson.Util; import hudson.util.IOException2; -import hudson.FilePath.FileCallable; -import hudson.remoting.VirtualChannel; import jenkins.model.Jenkins; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import org.kohsuke.stapler.HttpResponse; -import org.apache.tools.ant.types.FileSet; -import org.apache.tools.ant.DirectoryScanner; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -53,6 +47,9 @@ import java.util.Locale; import java.util.StringTokenizer; import java.util.logging.Logger; import java.util.logging.Level; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; +import jenkins.util.VirtualFile; /** * Has convenience methods to serve file system. @@ -69,7 +66,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { public final String title; - private final FilePath base; + private final VirtualFile base; private final String icon; private final boolean serveDirIndex; private String indexFileName = "index.html"; @@ -79,7 +76,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { * Use {@link #DirectoryBrowserSupport(ModelObject, FilePath, String, String, boolean)} */ public DirectoryBrowserSupport(ModelObject owner, String title) { - this(owner,null,title,null,false); + this(owner, (VirtualFile) null, title, null, false); } /** @@ -96,6 +93,24 @@ public final class DirectoryBrowserSupport implements HttpResponse { * False to serve "index.html" */ public DirectoryBrowserSupport(ModelObject owner, FilePath base, String title, String icon, boolean serveDirIndex) { + this(owner, base.toVirtualFile(), title, icon, serveDirIndex); + } + + /** + * @param owner + * The parent model object under which the directory browsing is added. + * @param base + * The root of the directory that's bound to URL. + * @param title + * Used in the HTML caption. + * @param icon + * The icon file name, like "folder.gif" + * @param serveDirIndex + * True to generate the directory index. + * False to serve "index.html" + * @since 1.532 + */ + public DirectoryBrowserSupport(ModelObject owner, VirtualFile base, String title, String icon, boolean serveDirIndex) { this.owner = owner; this.base = base; this.title = title; @@ -133,6 +148,10 @@ public final class DirectoryBrowserSupport implements HttpResponse { * from the {@code doXYZ} method and let Stapler generate a response for you. */ public void serveFile(StaplerRequest req, StaplerResponse rsp, FilePath root, String icon, boolean serveDirIndex) throws IOException, ServletException, InterruptedException { + serveFile(req, rsp, root.toVirtualFile(), icon, serveDirIndex); + } + + private void serveFile(StaplerRequest req, StaplerResponse rsp, VirtualFile root, String icon, boolean serveDirIndex) throws IOException, ServletException, InterruptedException { // handle form submission String pattern = req.getParameter("pattern"); if(pattern==null) @@ -163,7 +182,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { String pathElement = pathTokens.nextToken(); // Treat * and ? as wildcard unless they match a literal filename if((pathElement.contains("?") || pathElement.contains("*")) - && inBase && !(new FilePath(root, (_base.length() > 0 ? _base + "/" : "") + pathElement).exists())) + && inBase && !root.child((_base.length() > 0 ? _base + "/" : "") + pathElement).exists()) inBase = false; if(pathElement.equals("*zip*")) { // the expected syntax is foo/bar/*zip*/bar.zip @@ -189,20 +208,23 @@ public final class DirectoryBrowserSupport implements HttpResponse { String rest = _rest.toString(); // this is the base file/directory - FilePath baseFile = new FilePath(root,base); + VirtualFile baseFile = root.child(base); if(baseFile.isDirectory()) { if(zip) { rsp.setContentType("application/zip"); - baseFile.zip(rsp.getOutputStream(),rest); + zip(rsp.getOutputStream(), baseFile, rest); return; } if (plain) { rsp.setContentType("text/plain;charset=UTF-8"); OutputStream os = rsp.getOutputStream(); try { - for (String kid : baseFile.act(new SimpleChildList())) { - os.write(kid.getBytes("UTF-8")); + for (VirtualFile kid : baseFile.list()) { + os.write(kid.getName().getBytes("UTF-8")); + if (kid.isDirectory()) { + os.write('/'); + } os.write('\n'); } os.flush(); @@ -221,15 +243,15 @@ public final class DirectoryBrowserSupport implements HttpResponse { } } - FileCallable>> glob = null; + List> glob = null; if(rest.length()>0) { // the rest is Ant glob pattern - glob = new PatternScanner(rest,createBackRef(restSize)); + glob = patternScan(baseFile, rest, createBackRef(restSize)); } else if(serveDirIndex) { // serve directory index - glob = new ChildPathBuilder(req.getLocale()); + glob = buildChildPaths(baseFile, req.getLocale()); } if(glob!=null) { @@ -239,7 +261,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { req.setAttribute("parentPath",parentPaths); req.setAttribute("backPath", createBackRef(restSize)); req.setAttribute("topPath", createBackRef(parentPaths.size()+restSize)); - req.setAttribute("files", baseFile.act(glob)); + req.setAttribute("files", glob); req.setAttribute("icon", icon); req.setAttribute("path", path); req.setAttribute("pattern",rest); @@ -262,24 +284,25 @@ public final class DirectoryBrowserSupport implements HttpResponse { boolean view = rest.equals("*view*"); if(rest.equals("*fingerprint*")) { - rsp.forward(Jenkins.getInstance().getFingerprint(baseFile.digest()),"/",req); + rsp.forward(Jenkins.getInstance().getFingerprint(Util.getDigestOf(baseFile.open())), "/", req); return; } - ContentInfo ci = baseFile.act(new ContentInfo()); + long lastModified = baseFile.lastModified(); + long length = baseFile.length(); if(LOGGER.isLoggable(Level.FINE)) - LOGGER.fine("Serving "+baseFile+" with lastModified="+ci.lastModified+", contentLength="+ci.contentLength); + LOGGER.fine("Serving "+baseFile+" with lastModified=" + lastModified + ", length=" + length); - InputStream in = baseFile.read(); + InputStream in = baseFile.open(); if (view) { // for binary files, provide the file name for download rsp.setHeader("Content-Disposition", "inline; filename=" + baseFile.getName()); // pseudo file name to let the Stapler set text/plain - rsp.serveFile(req, in, ci.lastModified, -1, ci.contentLength, "plain.txt"); + rsp.serveFile(req, in, lastModified, -1, length, "plain.txt"); } else { - rsp.serveFile(req, in, ci.lastModified, -1, ci.contentLength, baseFile.getName() ); + rsp.serveFile(req, in, lastModified, -1, length, baseFile.getName() ); } } @@ -290,19 +313,6 @@ public final class DirectoryBrowserSupport implements HttpResponse { return path; } - private static final class ContentInfo implements FileCallable { - long contentLength; - long lastModified; - - public ContentInfo invoke(File f, VirtualChannel channel) throws IOException { - contentLength = f.length(); - lastModified = f.lastModified(); - return this; - } - - private static final long serialVersionUID = 1L; - } - /** * Builds a list of {@link Path} that represents ancestors * from a string like "/foo/bar/zot". @@ -328,6 +338,19 @@ public final class DirectoryBrowserSupport implements HttpResponse { return buf.toString(); } + private static void zip(OutputStream outputStream, VirtualFile dir, String glob) throws IOException { + ZipOutputStream zos = new ZipOutputStream(outputStream); + for (String n : dir.list(glob.length() == 0 ? "**" : glob)) { + ZipEntry e = new ZipEntry(n); + VirtualFile f = dir.child(n); + e.setTime(f.lastModified()); + zos.putNextEntry(e); + Util.copyStream(f.open(), zos); + zos.closeEntry(); + } + zos.close(); + } + /** * Represents information about one file or folder. */ @@ -349,7 +372,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { private final long size; /** - * If the current user can read the file. + * If the current user can read the file. */ private final boolean isReadable; @@ -393,14 +416,14 @@ public final class DirectoryBrowserSupport implements HttpResponse { - private static final class FileComparator implements Comparator { + private static final class FileComparator implements Comparator { private Collator collator; public FileComparator(Locale locale) { this.collator = Collator.getInstance(locale); } - public int compare(File lhs, File rhs) { + public int compare(VirtualFile lhs, VirtualFile rhs) { // directories first, files next int r = dirRank(lhs)-dirRank(rhs); if(r!=0) return r; @@ -408,29 +431,13 @@ public final class DirectoryBrowserSupport implements HttpResponse { return this.collator.compare(lhs.getName(), rhs.getName()); } - private int dirRank(File f) { + private int dirRank(VirtualFile f) { + try { if(f.isDirectory()) return 0; else return 1; - } - } - - /** - * Simple list of names of children of a folder. - * Subfolders will have a trailing slash appended. - */ - private static final class SimpleChildList implements FileCallable> { - private static final long serialVersionUID = 1L; - public List invoke(File f, VirtualChannel channel) throws IOException { - List r = new ArrayList(); - String[] kids = f.list(); // no need to sort - for (String kid : kids) { - if (new File(f, kid).isDirectory()) { - r.add(kid + "/"); - } else { - r.add(kid); - } + } catch (IOException ex) { + return 0; } - return r; } } @@ -439,22 +446,14 @@ public final class DirectoryBrowserSupport implements HttpResponse { * list of {@link Path} represents one child item to be shown * (this mechanism is used to skip empty intermediate directory.) */ - private static final class ChildPathBuilder implements FileCallable>> { - private Locale locale; - - public ChildPathBuilder(Locale locale) { - this.locale = locale; - } - - public List> invoke(File cur, VirtualChannel channel) throws IOException { + private static List> buildChildPaths(VirtualFile cur, Locale locale) throws IOException { List> r = new ArrayList>(); - File[] files = cur.listFiles(); - if (files != null) { - Arrays.sort(files,new FileComparator(this.locale)); + VirtualFile[] files = cur.list(); + Arrays.sort(files,new FileComparator(locale)); - for( File f : files ) { - Path p = new Path(Util.rawEncode(f.getName()),f.getName(),f.isDirectory(),f.length(), f.canRead()); + for( VirtualFile f : files ) { + Path p = new Path(Util.rawEncode(f.getName()), f.getName(), f.isDirectory(), f.length(), f.canRead()); if(!f.isDirectory()) { r.add(Collections.singletonList(p)); } else { @@ -464,53 +463,38 @@ public final class DirectoryBrowserSupport implements HttpResponse { String relPath = Util.rawEncode(f.getName()); while(true) { // files that don't start with '.' qualify for 'meaningful files', nor SCM related files - File[] sub = f.listFiles(new FilenameFilter() { - public boolean accept(File dir, String name) { - return !name.startsWith(".") && !name.equals("CVS") && !name.equals(".svn"); + List sub = new ArrayList(); + for (VirtualFile vf : f.list()) { + String name = vf.getName(); + if (!name.startsWith(".") && !name.equals("CVS") && !name.equals(".svn")) { + sub.add(vf); } - }); - if(sub==null || sub.length!=1 || !sub[0].isDirectory()) + } + if (sub.size() !=1 || !sub.get(0).isDirectory()) break; - f = sub[0]; + f = sub.get(0); relPath += '/'+Util.rawEncode(f.getName()); l.add(new Path(relPath,f.getName(),true,0, f.canRead())); } r.add(l); } } - } return r; - } - - private static final long serialVersionUID = 1L; } /** * Runs ant GLOB against the current {@link FilePath} and returns matching * paths. + * @param baseRef String like "../../../" that cancels the 'rest' portion. Can be "./" */ - private static class PatternScanner implements FileCallable>> { - private final String pattern; - /** - * String like "../../../" that cancels the 'rest' portion. Can be "./" - */ - private final String baseRef; - - public PatternScanner(String pattern,String baseRef) { - this.pattern = pattern; - this.baseRef = baseRef; - } - - public List> invoke(File baseDir, VirtualChannel channel) throws IOException { - FileSet fs = Util.createFileSet(baseDir,pattern); - DirectoryScanner ds = fs.getDirectoryScanner(); - String[] files = ds.getIncludedFiles(); + private static List> patternScan(VirtualFile baseDir, String pattern, String baseRef) throws IOException { + String[] files = baseDir.list(pattern); if (files.length > 0) { List> r = new ArrayList>(files.length); for (String match : files) { - List file = buildPathList(baseDir, new File(baseDir,match)); + List file = buildPathList(baseDir, baseDir.child(match), baseRef); r.add(file); } return r; @@ -522,7 +506,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { /** * Builds a path list from the current workspace directory down to the specified file path. */ - private List buildPathList(File baseDir, File filePath) throws IOException { + private static List buildPathList(VirtualFile baseDir, VirtualFile filePath, String baseRef) throws IOException { List pathList = new ArrayList(); StringBuilder href = new StringBuilder(baseRef); @@ -533,8 +517,8 @@ public final class DirectoryBrowserSupport implements HttpResponse { /** * Builds the path list and href recursively top-down. */ - private void buildPathList(File baseDir, File filePath, List pathList, StringBuilder href) throws IOException { - File parent = filePath.getParentFile(); + private static void buildPathList(VirtualFile baseDir, VirtualFile filePath, List pathList, StringBuilder href) throws IOException { + VirtualFile parent = filePath.getParent(); if (!baseDir.equals(parent)) { buildPathList(baseDir, parent, pathList, href); } @@ -548,8 +532,6 @@ public final class DirectoryBrowserSupport implements HttpResponse { pathList.add(path); } - private static final long serialVersionUID = 1L; - } private static final Logger LOGGER = Logger.getLogger(DirectoryBrowserSupport.class.getName()); } diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index 4de1899d00..0e91bf7cf2 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -38,11 +38,13 @@ import hudson.BulkChange; import hudson.Extension; import hudson.model.listeners.ItemListener; import hudson.model.listeners.SaveableListener; +import hudson.util.AtomicFileWriter; import hudson.util.HexBinaryConverter; import hudson.util.Iterators; import hudson.util.PersistedList; import hudson.util.RunList; import hudson.util.XStream2; +import java.io.EOFException; import jenkins.model.FingerprintFacet; import jenkins.model.Jenkins; import jenkins.model.TransientFingerprintFacetFactory; @@ -66,6 +68,8 @@ import java.util.Map.Entry; import java.util.TreeMap; import java.util.logging.Level; import java.util.logging.Logger; +import javax.annotation.CheckForNull; +import org.xmlpull.v1.XmlPullParserException; /** * A file being tracked by Jenkins. @@ -993,8 +997,12 @@ public class Fingerprint implements ModelObject, Saveable { } } - if (modified) + if (modified) { + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "Saving trimmed {0}", getFingerprintFile(md5sum)); + } save(); + } return modified; } @@ -1099,8 +1107,9 @@ public class Fingerprint implements ModelObject, Saveable { if (facets.isEmpty()) { file.getParentFile().mkdirs(); // JENKINS-16301: fast path for the common case. - PrintWriter w = new PrintWriter(file, "UTF-8"); + AtomicFileWriter afw = new AtomicFileWriter(file); try { + PrintWriter w = new PrintWriter(afw); w.println(""); w.println(""); w.print(" "); @@ -1109,7 +1118,7 @@ public class Fingerprint implements ModelObject, Saveable { if (original != null) { w.println(" "); w.print(" "); - w.print(original.name); + w.print(Util.xmlEscape(original.name)); w.println(""); w.print(" "); w.print(original.number); @@ -1120,13 +1129,13 @@ public class Fingerprint implements ModelObject, Saveable { w.print(Util.toHexString(md5sum)); w.println(""); w.print(" "); - w.print(fileName); + w.print(Util.xmlEscape(fileName)); w.println(""); w.println(" "); for (Map.Entry e : usages.entrySet()) { w.println(" "); w.print(" "); - w.print(e.getKey()); + w.print(Util.xmlEscape(e.getKey())); w.println(""); w.print(" "); w.print(RangeSet.ConverterImpl.serialize(e.getValue())); @@ -1137,8 +1146,9 @@ public class Fingerprint implements ModelObject, Saveable { w.println(" "); w.print(""); w.flush(); + afw.commit(); } finally { - w.close(); + afw.abort(); } } else { // Slower fallback that can persist facets. @@ -1195,10 +1205,10 @@ public class Fingerprint implements ModelObject, Saveable { /** * Loads a {@link Fingerprint} from a file in the image. */ - /*package*/ static Fingerprint load(byte[] md5sum) throws IOException { + /*package*/ static @CheckForNull Fingerprint load(byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } - /*package*/ static Fingerprint load(File file) throws IOException { + /*package*/ static @CheckForNull Fingerprint load(File file) throws IOException { XmlFile configFile = getConfigFile(file); if(!configFile.exists()) return null; @@ -1224,7 +1234,13 @@ public class Fingerprint implements ModelObject, Saveable { // generally we don't want to wipe out user data just because we can't load it, // but if the file size is 0, which is what's reported in HUDSON-2012, then it seems // like recovering it silently by deleting the file is not a bad idea. - logger.log(Level.WARNING, "Size zero fingerprint. Disk corruption? "+configFile,e); + logger.log(Level.WARNING, "Size zero fingerprint. Disk corruption? {0}", configFile); + file.delete(); + return null; + } + String parseError = messageOfParseException(e); + if (parseError != null) { + logger.log(Level.WARNING, "Malformed XML in {0}: {1}", new Object[] {configFile, parseError}); file.delete(); return null; } @@ -1232,6 +1248,17 @@ public class Fingerprint implements ModelObject, Saveable { throw e; } } + private static String messageOfParseException(Throwable t) { + if (t instanceof XmlPullParserException || t instanceof EOFException) { + return t.getMessage(); + } + Throwable t2 = t.getCause(); + if (t2 != null) { + return messageOfParseException(t2); + } else { + return null; + } + } @Override public String toString() { return "Fingerprint[original=" + original + ",hash=" + getHashString() + ",fileName=" + fileName + ",timestamp=" + DATE_CONVERTER.toString(timestamp) + ",usages=" + new TreeMap(usages) + ",facets=" + facets + "]"; diff --git a/core/src/main/java/hudson/model/FingerprintCleanupThread.java b/core/src/main/java/hudson/model/FingerprintCleanupThread.java index 1b0dc37278..c04830911d 100644 --- a/core/src/main/java/hudson/model/FingerprintCleanupThread.java +++ b/core/src/main/java/hudson/model/FingerprintCleanupThread.java @@ -100,12 +100,14 @@ public final class FingerprintCleanupThread extends AsyncPeriodicWork { private boolean check(File fingerprintFile) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); - if(!fp.isAlive()) { + if (fp == null || !fp.isAlive()) { + logger.fine("deleting obsolete " + fingerprintFile); fingerprintFile.delete(); return true; } else { // get the fingerprint in the official map so have the changes visible to Jenkins // otherwise the mutation made in FingerprintMap can override our trimming. + logger.finer("possibly trimming " + fingerprintFile); fp = Jenkins.getInstance()._getFingerprint(fp.getHashString()); return fp.trim(); } diff --git a/core/src/main/java/hudson/model/ItemGroupMixIn.java b/core/src/main/java/hudson/model/ItemGroupMixIn.java index 2b23b27c16..ef8f30d919 100644 --- a/core/src/main/java/hudson/model/ItemGroupMixIn.java +++ b/core/src/main/java/hudson/model/ItemGroupMixIn.java @@ -120,7 +120,7 @@ public abstract class ItemGroupMixIn { * or throws an exception if it fails. */ public synchronized TopLevelItem createTopLevelItem( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { - acl.checkPermission(Job.CREATE); + acl.checkPermission(Item.CREATE); TopLevelItem result; @@ -192,7 +192,7 @@ public abstract class ItemGroupMixIn { */ @SuppressWarnings({"unchecked"}) public synchronized T copy(T src, String name) throws IOException { - acl.checkPermission(Job.CREATE); + acl.checkPermission(Item.CREATE); T result = (T)createProject(src.getDescriptor(),name,false); @@ -216,7 +216,7 @@ public abstract class ItemGroupMixIn { } public synchronized TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException { - acl.checkPermission(Job.CREATE); + acl.checkPermission(Item.CREATE); Jenkins.getInstance().getProjectNamingStrategy().checkName(name); // place it as config.xml @@ -248,7 +248,7 @@ public abstract class ItemGroupMixIn { public synchronized TopLevelItem createProject( TopLevelItemDescriptor type, String name, boolean notify ) throws IOException { - acl.checkPermission(Job.CREATE); + acl.checkPermission(Item.CREATE); Jenkins.getInstance().getProjectNamingStrategy().checkName(name); if(parent.getItem(name)!=null) diff --git a/core/src/main/java/hudson/model/ListView.java b/core/src/main/java/hudson/model/ListView.java index 74616ebf80..7031bdad95 100644 --- a/core/src/main/java/hudson/model/ListView.java +++ b/core/src/main/java/hudson/model/ListView.java @@ -36,12 +36,7 @@ import hudson.views.ListViewColumn; import hudson.views.ViewJobFilter; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; +import java.util.*; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; @@ -165,7 +160,8 @@ public class ListView extends View implements Saveable { } ItemGroup parent = getOwnerItemGroup(); - includeItems(parent, names); + List parentItems = new ArrayList(parent.getItems()); + includeItems(parent, parentItems, names); Boolean statusFilter = this.statusFilter; // capture the value to isolate us from concurrent update for (TopLevelItem item : Items.getAllItems(getOwnerItemGroup(), TopLevelItem.class)) { @@ -178,7 +174,7 @@ public class ListView extends View implements Saveable { // check the filters Iterable jobFilters = getJobFilters(); - List allItems = new ArrayList(parent.getItems()); + List allItems = new ArrayList(parentItems); for (ViewJobFilter jobFilter: jobFilters) { items = jobFilter.filter(items, allItems, this); } @@ -193,16 +189,12 @@ public class ListView extends View implements Saveable { return getItems().contains(item); } - private void includeItems(ItemGroup parent, SortedSet names) { - includeItems(parent, parent, names); - } - - private void includeItems(ItemGroup root, ItemGroup parent, SortedSet names) { + private void includeItems(ItemGroup root, Collection parentItems, SortedSet names) { if (includePattern != null) { - for (Item item : parent.getItems()) { + for (Item item : parentItems) { if (recurse && item instanceof ItemGroup) { ItemGroup ig = (ItemGroup) item; - includeItems(root, ig, names); + includeItems(root, ig.getItems(), names); } if (item instanceof TopLevelItem) { String itemName = item.getRelativeNameFrom(root); @@ -345,6 +337,7 @@ public class ListView extends View implements Saveable { statusFilter = filter != null ? "1".equals(filter) : null; } + /** @since 1.526 */ public void setIncludeRegex(String includeRegex) { this.includeRegex = Util.nullify(includeRegex); if (this.includeRegex == null) diff --git a/core/src/main/java/hudson/model/MyView.java b/core/src/main/java/hudson/model/MyView.java index 0d61be1d7c..f10c2540eb 100644 --- a/core/src/main/java/hudson/model/MyView.java +++ b/core/src/main/java/hudson/model/MyView.java @@ -57,7 +57,7 @@ public class MyView extends View { @Override public boolean contains(TopLevelItem item) { - return item.hasPermission(Job.CONFIGURE); + return item.hasPermission(Item.CONFIGURE); } @Override @@ -74,7 +74,7 @@ public class MyView extends View { public Collection getItems() { List items = new ArrayList(); for (TopLevelItem item : getOwnerItemGroup().getItems()) { - if (item.hasPermission(Job.CONFIGURE)) { + if (item.hasPermission(Item.CONFIGURE)) { items.add(item); } } diff --git a/core/src/main/java/hudson/model/Result.java b/core/src/main/java/hudson/model/Result.java index b95001e07d..cd6226a9c7 100644 --- a/core/src/main/java/hudson/model/Result.java +++ b/core/src/main/java/hudson/model/Result.java @@ -87,6 +87,7 @@ public final class Result implements Serializable, CustomExportedBean { /** * Is this a complete build - i.e. did it run to the end (not aborted)? + * @since 1.526 */ public final boolean completeBuild; @@ -125,8 +126,7 @@ public final class Result implements Serializable, CustomExportedBean { /** * Is this a complete build - i.e. did it run to the end (not aborted)? - * - * @since TODO + * @since 1.526 */ public boolean isCompleteBuild() { return this.completeBuild; diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 49a551be39..9651401834 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -52,14 +52,12 @@ import hudson.security.AccessControlled; import hudson.security.Permission; import hudson.security.PermissionGroup; import hudson.tasks.BuildWrapper; -import hudson.tasks.BuildStep; import hudson.tasks.test.AbstractTestResultAction; import hudson.util.FlushProofOutputStream; import hudson.util.FormApply; import hudson.util.IOException2; import hudson.util.LogTaskListener; import hudson.util.XStream2; -import hudson.util.ProcessTree; import java.io.BufferedReader; import java.io.File; @@ -121,8 +119,13 @@ import java.io.StringWriter; import static java.util.logging.Level.*; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; +import jenkins.model.ArtifactManager; +import jenkins.model.ArtifactManagerConfiguration; +import jenkins.model.ArtifactManagerFactory; import jenkins.model.PeepholePermalink; +import jenkins.model.StandardArtifactManager; import jenkins.model.RunAction2; +import jenkins.util.VirtualFile; /** * A particular execution of {@link Job}. @@ -257,6 +260,12 @@ public abstract class Run ,RunT extends Run ID_FORMATTER = new IDFormatterProvider(); private static final class IDFormatterProvider extends ThreadLocal { @@ -326,6 +335,9 @@ public abstract class Run ,RunT extends Run,RunT extends Run * When a build is {@link #isBuilding() in progress}, this method * returns an intermediate result. + * @return The status of the build, if it has completed or some build step has set a status; may be null if the build is ongoing. */ @Exported - public Result getResult() { + public @CheckForNull Result getResult() { return result; } @@ -964,8 +977,52 @@ public abstract class Run ,RunT extends RunThis method should be used when existing artifacts are to be loaded, displayed, or removed. + * If adding artifacts, use {@link #pickArtifactManager} instead. + * @return an appropriate artifact manager + * @since 1.532 */ + public final @Nonnull ArtifactManager getArtifactManager() { + return artifactManager != null ? artifactManager : new StandardArtifactManager(this); + } + + /** + * Selects an object responsible for storing and retrieving build artifacts. + * The first time this is called on a running build, {@link ArtifactManagerConfiguration} is checked + * to see if one will handle this build. + * If so, that manager is saved in the build and it will be used henceforth. + * If no manager claimed the build, {@link StandardArtifactManager} is used. + *

    This method should be used when a build step expects to archive some artifacts. + * If only displaying existing artifacts, use {@link #getArtifactManager} instead. + * @return an appropriate artifact manager + * @throws IOException if a custom manager was selected but the selection could not be saved + * @since 1.532 + */ + public final synchronized @Nonnull ArtifactManager pickArtifactManager() throws IOException { + if (artifactManager != null) { + return artifactManager; + } else { + for (ArtifactManagerFactory f : ArtifactManagerConfiguration.get().getArtifactManagerFactories()) { + ArtifactManager mgr = f.managerFor(this); + if (mgr != null) { + artifactManager = mgr; + save(); + return mgr; + } + } + return new StandardArtifactManager(this); + } + } + + /** + * Gets the directory where the artifacts are archived. + * @deprecated Should only be used from {@link StandardArtifactManager} or subclasses. + */ + @Deprecated public File getArtifactsDir() { return new File(getRootDir(),"archive"); } @@ -983,7 +1040,11 @@ public abstract class Run ,RunT extends Run getArtifactsUpTo(int n) { ArtifactList r = new ArtifactList(); - addArtifacts(getArtifactsDir(),"","",r,null,n); + try { + addArtifacts(getArtifactManager().root(), "", "", r, null, n); + } catch (IOException x) { + LOGGER.log(Level.WARNING, null, x); + } r.computeDisplayName(); return r; } @@ -998,18 +1059,17 @@ public abstract class Run ,RunT extends Run,RunT extends Run,RunT extends Run,RunT extends Run dependencies = new HashMap(); + /** + * Optional dependencies of this plugin. + */ + @Exported + public final Map optionalDependencies = new HashMap(); + @DataBoundConstructor public Plugin(String sourceId, JSONObject o) { super(sourceId, o, UpdateSite.this.url); @@ -611,9 +617,12 @@ public class UpdateSite { // Make sure there's a name attribute, that that name isn't maven-plugin - we ignore that one - // and that the optional value isn't true. if (get(depObj,"name")!=null - && !get(depObj,"name").equals("maven-plugin") - && get(depObj,"optional").equals("false")) { - dependencies.put(get(depObj,"name"), get(depObj,"version")); + && !get(depObj,"name").equals("maven-plugin")) { + if (get(depObj, "optional").equals("false")) { + dependencies.put(get(depObj, "name"), get(depObj, "version")); + } else { + optionalDependencies.put(get(depObj, "name"), get(depObj, "version")); + } } } @@ -691,6 +700,22 @@ public class UpdateSite { } } + for(Map.Entry e : optionalDependencies.entrySet()) { + Plugin depPlugin = Jenkins.getInstance().getUpdateCenter().getPlugin(e.getKey()); + if (depPlugin == null) { + continue; + } + VersionNumber requiredVersion = new VersionNumber(e.getValue()); + + PluginWrapper current = depPlugin.getInstalled(); + + // If the optional dependency plugin is installed, is the version we depend on newer than + // what's installed? If so, upgrade. + if (current != null && current.isOlderThan(requiredVersion)) { + deps.add(depPlugin); + } + } + return deps; } @@ -703,6 +728,43 @@ public class UpdateSite { } } + public VersionNumber getNeededDependenciesRequiredCore() { + VersionNumber versionNumber = null; + try { + versionNumber = requiredCore == null ? null : new VersionNumber(requiredCore); + } catch (NumberFormatException nfe) { + // unable to parse version + } + for (Plugin p: getNeededDependencies()) { + VersionNumber v = p.getNeededDependenciesRequiredCore(); + if (versionNumber == null || v.isNewerThan(versionNumber)) versionNumber = v; + } + return versionNumber; + } + + public boolean isNeededDependenciesForNewerJenkins() { + for (Plugin p: getNeededDependencies()) { + if (p.isForNewerHudson() || p.isNeededDependenciesForNewerJenkins()) return true; + } + return false; + } + + /** + * If at least some of the plugin's needed dependencies are already installed, and the new version of the + * needed dependencies plugin have a "compatibleSinceVersion" + * value (i.e., it's only directly compatible with that version or later), this will check to + * see if the installed version is older than the compatible-since version. If it is older, it'll return false. + * If it's not older, or it's not installed, or it's installed but there's no compatibleSinceVersion + * specified, it'll return true. + */ + public boolean isNeededDependenciesCompatibleWithInstalledVersion() { + for (Plugin p: getNeededDependencies()) { + if (!p.isCompatibleWithInstalledVersion() || !p.isNeededDependenciesCompatibleWithInstalledVersion()) + return false; + } + return true; + } + /** * @deprecated as of 1.326 * Use {@link #deploy()}. diff --git a/core/src/main/java/hudson/model/User.java b/core/src/main/java/hudson/model/User.java index a398cf6f72..94b6369975 100644 --- a/core/src/main/java/hudson/model/User.java +++ b/core/src/main/java/hudson/model/User.java @@ -25,7 +25,6 @@ package hudson.model; import com.infradna.tool.bridge_method_injector.WithBridgeMethods; -import com.thoughtworks.xstream.XStream; import hudson.*; import hudson.model.Descriptor.FormException; import hudson.model.listeners.SaveableListener; @@ -325,7 +324,10 @@ public class User extends AbstractModelObject implements AccessControlled, Descr String id = null; for (CanonicalIdResolver resolver : resolvers) { id = resolver.resolveCanonicalId(idOrFullName, context); - if (id != null) break; + if (id != null) { + LOGGER.log(Level.FINE, "{0} mapped {1} to {2}", new Object[] {resolver, idOrFullName, id}); + break; + } } // DefaultUserCanonicalIdResolver will always return a non-null id if all other CanonicalIdResolver failed @@ -342,8 +344,15 @@ public class User extends AbstractModelObject implements AccessControlled, Descr if (u==null && (create || getConfigFileFor(id).exists())) { User tmp = new User(id, fullName); User prev = byName.putIfAbsent(idkey, u = tmp); - if (prev!=null) - u = prev; // if some has already put a value in the map, use it + if (prev != null) { + u = prev; // if some has already put a value in the map, use it + if (LOGGER.isLoggable(Level.FINE) && !fullName.equals(prev.getFullName())) { + LOGGER.log(Level.FINE, "mismatch on fullName (‘" + fullName + "’ vs. ‘" + prev.getFullName() + "’) for ‘" + id + "’", new Throwable()); + } + } + if (LOGGER.isLoggable(Level.FINE) && id.equals(fullName) && fullName.matches(".+ _\\S+@\\S+_")) { + LOGGER.log(Level.FINE, "[JENKINS-16332] Suspicious fullName being stored: " + fullName, new Throwable()); + } } return u; } @@ -710,7 +719,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr return new ContextMenu().from(this,request,response); } - public static abstract class CanonicalIdResolver extends AbstractDescribableImpl implements Comparable { + public static abstract class CanonicalIdResolver extends AbstractDescribableImpl implements ExtensionPoint, Comparable { /** * context key for realm (domain) where idOrFullName has been retreived from. diff --git a/core/src/main/java/hudson/model/UserProperty.java b/core/src/main/java/hudson/model/UserProperty.java index ad67a05279..3400bb27ee 100644 --- a/core/src/main/java/hudson/model/UserProperty.java +++ b/core/src/main/java/hudson/model/UserProperty.java @@ -46,7 +46,7 @@ import org.kohsuke.stapler.export.ExportedBean; * Within this page, the {@link UserProperty} instance is available * as instance variable (while it refers to {@link User}. * See {@link hudson.search.UserSearchProperty}'s config.jelly for an example. - * + *

    A property may also define a {@code summary.jelly} view to show in the main user screen. * * @author Kohsuke Kawaguchi */ diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index f6890b6f75..2b243d3ca5 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -420,6 +420,13 @@ public abstract class SCM implements Describable, ExtensionPoint { */ public abstract boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException; + /** + * Get a chance to do operations after the workspace i checked out and the changelog is written. + */ + public void postCheckout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener) throws IOException, InterruptedException { + /* Default implementation is noop */ + } + /** * Adds environmental variables for the builds to the given map. * diff --git a/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java b/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java deleted file mode 100644 index 6b2af60735..0000000000 --- a/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc., Peter Hayes, Tom Huybrechts - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package hudson.security; - -import hudson.diagnosis.OldDataMonitor; -import hudson.model.AbstractProject; -import hudson.model.Item; -import hudson.model.Job; -import hudson.model.JobProperty; -import hudson.model.JobPropertyDescriptor; -import jenkins.model.Jenkins; -import hudson.model.Run; -import hudson.Extension; -import hudson.util.FormValidation; -import hudson.util.RobustReflectionConverter; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Collections; -import java.util.Map.Entry; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.io.IOException; - -import net.sf.json.JSONObject; - -import org.acegisecurity.acls.sid.Sid; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.QueryParameter; -import org.kohsuke.stapler.AncestorInPath; - -import com.thoughtworks.xstream.converters.Converter; -import com.thoughtworks.xstream.converters.MarshallingContext; -import com.thoughtworks.xstream.converters.UnmarshallingContext; -import com.thoughtworks.xstream.io.HierarchicalStreamReader; -import com.thoughtworks.xstream.io.HierarchicalStreamWriter; - -import javax.servlet.ServletException; - -/** - * {@link JobProperty} to associate ACL for each project. - * - *

    - * Once created (and initialized), this object becomes immutable. - */ -public class AuthorizationMatrixProperty extends JobProperty> { - - private transient SidACL acl = new AclImpl(); - - /** - * List up all permissions that are granted. - * - * Strings are either the granted authority or the principal, which is not - * distinguished. - */ - private final Map> grantedPermissions = new HashMap>(); - - private Set sids = new HashSet(); - - private AuthorizationMatrixProperty() { - } - - public AuthorizationMatrixProperty(Map> grantedPermissions) { - // do a deep copy to be safe - for (Entry> e : grantedPermissions.entrySet()) - this.grantedPermissions.put(e.getKey(),new HashSet(e.getValue())); - } - - public Set getGroups() { - return sids; - } - - /** - * Returns all SIDs configured in this matrix, minus "anonymous" - * - * @return Always non-null. - */ - public List getAllSIDs() { - Set r = new HashSet(); - for (Set set : grantedPermissions.values()) - r.addAll(set); - r.remove("anonymous"); - - String[] data = r.toArray(new String[r.size()]); - Arrays.sort(data); - return Arrays.asList(data); - } - - /** - * Returns all the (Permission,sid) pairs that are granted, in the multi-map form. - * - * @return - * read-only. never null. - */ - public Map> getGrantedPermissions() { - return Collections.unmodifiableMap(grantedPermissions); - } - - /** - * Adds to {@link #grantedPermissions}. Use of this method should be limited - * during construction, as this object itself is considered immutable once - * populated. - */ - protected void add(Permission p, String sid) { - Set set = grantedPermissions.get(p); - if (set == null) - grantedPermissions.put(p, set = new HashSet()); - set.add(sid); - sids.add(sid); - } - - @Extension - public static class DescriptorImpl extends JobPropertyDescriptor { - @Override - public JobProperty newInstance(StaplerRequest req, JSONObject formData) throws FormException { - formData = formData.getJSONObject("useProjectSecurity"); - if (formData.isNullObject()) - return null; - - AuthorizationMatrixProperty amp = new AuthorizationMatrixProperty(); - for (Map.Entry r : (Set>) formData.getJSONObject("data").entrySet()) { - String sid = r.getKey(); - if (r.getValue() instanceof JSONObject) { - for (Map.Entry e : (Set>) ((JSONObject) r - .getValue()).entrySet()) { - if (e.getValue()) { - Permission p = Permission.fromId(e.getKey()); - amp.add(p, sid); - } - } - } - } - return amp; - } - - @Override - public boolean isApplicable(Class jobType) { - // only applicable when ProjectMatrixAuthorizationStrategy is in charge - return Jenkins.getInstance().getAuthorizationStrategy() instanceof ProjectMatrixAuthorizationStrategy; - } - - @Override - public String getDisplayName() { - return "Authorization Matrix"; - } - - public List getAllGroups() { - List r = new ArrayList(); - for (PermissionGroup pg : PermissionGroup.getAll()) { - if (pg.hasPermissionContainedBy(PermissionScope.ITEM)) - r.add(pg); - } - return r; - } - - public boolean showPermission(Permission p) { - return p.getEnabled() && p.isContainedBy(PermissionScope.ITEM); - } - - public FormValidation doCheckName(@AncestorInPath Job project, @QueryParameter String value) throws IOException, ServletException { - return GlobalMatrixAuthorizationStrategy.DESCRIPTOR.doCheckName_(value, project, AbstractProject.CONFIGURE); - } - } - - private final class AclImpl extends SidACL { - protected Boolean hasPermission(Sid sid, Permission p) { - if (AuthorizationMatrixProperty.this.hasPermission(toString(sid),p)) - return true; - return null; - } - } - - public SidACL getACL() { - return acl; - } - - /** - * Checks if the given SID has the given permission. - */ - public boolean hasPermission(String sid, Permission p) { - for (; p != null; p = p.impliedBy) { - Set set = grantedPermissions.get(p); - if (set != null && set.contains(sid)) - return true; - } - return false; - } - - /** - * Checks if the permission is explicitly given, instead of implied through {@link Permission#impliedBy}. - */ - public boolean hasExplicitPermission(String sid, Permission p) { - Set set = grantedPermissions.get(p); - return set != null && set.contains(sid); - } - - /** - * Works like {@link #add(Permission, String)} but takes both parameters - * from a single string of the form PERMISSIONID:sid - */ - private void add(String shortForm) { - int idx = shortForm.indexOf(':'); - Permission p = Permission.fromId(shortForm.substring(0, idx)); - if (p==null) - throw new IllegalArgumentException("Failed to parse '"+shortForm+"' --- no such permission"); - add(p, shortForm.substring(idx + 1)); - } - - /** - * Persist {@link ProjectMatrixAuthorizationStrategy} as a list of IDs that - * represent {@link ProjectMatrixAuthorizationStrategy#grantedPermissions}. - */ - public static final class ConverterImpl implements Converter { - public boolean canConvert(Class type) { - return type == AuthorizationMatrixProperty.class; - } - - public void marshal(Object source, HierarchicalStreamWriter writer, - MarshallingContext context) { - AuthorizationMatrixProperty amp = (AuthorizationMatrixProperty) source; - - for (Entry> e : amp.grantedPermissions - .entrySet()) { - String p = e.getKey().getId(); - for (String sid : e.getValue()) { - writer.startNode("permission"); - writer.setValue(p + ':' + sid); - writer.endNode(); - } - } - } - - public Object unmarshal(HierarchicalStreamReader reader, - final UnmarshallingContext context) { - AuthorizationMatrixProperty as = new AuthorizationMatrixProperty(); - - String prop = reader.peekNextChild(); - if (prop!=null && prop.equals("useProjectSecurity")) { - reader.moveDown(); - reader.getValue(); // we used to use this but not any more. - reader.moveUp(); - } - while (reader.hasMoreChildren()) { - reader.moveDown(); - try { - as.add(reader.getValue()); - } catch (IllegalArgumentException ex) { - Logger.getLogger(AuthorizationMatrixProperty.class.getName()) - .log(Level.WARNING,"Skipping a non-existent permission",ex); - RobustReflectionConverter.addErrorInContext(context, ex); - } - reader.moveUp(); - } - - if (GlobalMatrixAuthorizationStrategy.migrateHudson2324(as.grantedPermissions)) - OldDataMonitor.report(context, "1.301"); - - return as; - } - } -} diff --git a/core/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java b/core/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java deleted file mode 100644 index 764be2e9ef..0000000000 --- a/core/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package hudson.security; - -import com.thoughtworks.xstream.converters.Converter; -import com.thoughtworks.xstream.converters.MarshallingContext; -import com.thoughtworks.xstream.converters.UnmarshallingContext; -import com.thoughtworks.xstream.io.HierarchicalStreamReader; -import com.thoughtworks.xstream.io.HierarchicalStreamWriter; -import hudson.diagnosis.OldDataMonitor; -import hudson.model.Descriptor; -import jenkins.model.Jenkins; -import hudson.model.Item; -import hudson.util.FormValidation; -import hudson.util.FormValidation.Kind; -import hudson.util.VersionNumber; -import hudson.util.RobustReflectionConverter; -import hudson.Functions; -import hudson.Extension; -import net.sf.json.JSONObject; -import org.acegisecurity.AuthenticationException; -import org.acegisecurity.userdetails.UsernameNotFoundException; -import org.acegisecurity.acls.sid.Sid; -import org.kohsuke.stapler.Stapler; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.QueryParameter; -import org.springframework.dao.DataAccessException; - -import javax.servlet.ServletException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.io.IOException; -import java.util.Collections; -import java.util.SortedMap; -import java.util.TreeMap; - -/** - * Role-based authorization via a matrix. - * - * @author Kohsuke Kawaguchi - */ -// TODO: think about the concurrency commitment of this class -public class GlobalMatrixAuthorizationStrategy extends AuthorizationStrategy { - private transient SidACL acl = new AclImpl(); - - /** - * List up all permissions that are granted. - * - * Strings are either the granted authority or the principal, - * which is not distinguished. - */ - private final Map> grantedPermissions = new HashMap>(); - - private final Set sids = new HashSet(); - - /** - * Adds to {@link #grantedPermissions}. - * Use of this method should be limited during construction, - * as this object itself is considered immutable once populated. - */ - public void add(Permission p, String sid) { - if (p==null) - throw new IllegalArgumentException(); - Set set = grantedPermissions.get(p); - if(set==null) - grantedPermissions.put(p,set = new HashSet()); - set.add(sid); - sids.add(sid); - } - - /** - * Works like {@link #add(Permission, String)} but takes both parameters - * from a single string of the form PERMISSIONID:sid - */ - private void add(String shortForm) { - int idx = shortForm.indexOf(':'); - Permission p = Permission.fromId(shortForm.substring(0, idx)); - if (p==null) - throw new IllegalArgumentException("Failed to parse '"+shortForm+"' --- no such permission"); - add(p,shortForm.substring(idx+1)); - } - - @Override - public SidACL getRootACL() { - return acl; - } - - public Set getGroups() { - return sids; - } - - /** - * Due to HUDSON-2324, we want to inject Item.READ permission to everyone who has Hudson.READ, - * to remain backward compatible. - * @param grantedPermissions - */ - /*package*/ static boolean migrateHudson2324(Map> grantedPermissions) { - boolean result = false; - if(Jenkins.getInstance().isUpgradedFromBefore(new VersionNumber("1.300.*"))) { - Set f = grantedPermissions.get(Jenkins.READ); - if (f!=null) { - Set t = grantedPermissions.get(Item.READ); - if (t!=null) - result = t.addAll(f); - else { - t = new HashSet(f); - result = true; - } - grantedPermissions.put(Item.READ,t); - } - } - return result; - } - - /** - * Checks if the given SID has the given permission. - */ - public boolean hasPermission(String sid, Permission p) { - for(; p!=null; p=p.impliedBy) { - Set set = grantedPermissions.get(p); - if(set!=null && set.contains(sid) && p.getEnabled()) - return true; - } - return false; - } - - /** - * Checks if the permission is explicitly given, instead of implied through {@link Permission#impliedBy}. - */ - public boolean hasExplicitPermission(String sid, Permission p) { - Set set = grantedPermissions.get(p); - return set != null && set.contains(sid) && p.getEnabled(); - } - - /** - * Returns all SIDs configured in this matrix, minus "anonymous" - * - * @return - * Always non-null. - */ - public List getAllSIDs() { - Set r = new HashSet(); - for (Set set : grantedPermissions.values()) - r.addAll(set); - r.remove("anonymous"); - - String[] data = r.toArray(new String[r.size()]); - Arrays.sort(data); - return Arrays.asList(data); - } - - private final class AclImpl extends SidACL { - protected Boolean hasPermission(Sid p, Permission permission) { - if(GlobalMatrixAuthorizationStrategy.this.hasPermission(toString(p),permission)) - return true; - return null; - } - } - - @Extension - public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl(); - - /** - * Persist {@link GlobalMatrixAuthorizationStrategy} as a list of IDs that - * represent {@link GlobalMatrixAuthorizationStrategy#grantedPermissions}. - */ - public static class ConverterImpl implements Converter { - public boolean canConvert(Class type) { - return type==GlobalMatrixAuthorizationStrategy.class; - } - - public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { - GlobalMatrixAuthorizationStrategy strategy = (GlobalMatrixAuthorizationStrategy)source; - - // Output in alphabetical order for readability. - SortedMap> sortedPermissions = new TreeMap>(Permission.ID_COMPARATOR); - sortedPermissions.putAll(strategy.grantedPermissions); - for (Entry> e : sortedPermissions.entrySet()) { - String p = e.getKey().getId(); - List sids = new ArrayList(e.getValue()); - Collections.sort(sids); - for (String sid : sids) { - writer.startNode("permission"); - writer.setValue(p+':'+sid); - writer.endNode(); - } - } - - } - - public Object unmarshal(HierarchicalStreamReader reader, final UnmarshallingContext context) { - GlobalMatrixAuthorizationStrategy as = create(); - - while (reader.hasMoreChildren()) { - reader.moveDown(); - try { - as.add(reader.getValue()); - } catch (IllegalArgumentException ex) { - Logger.getLogger(GlobalMatrixAuthorizationStrategy.class.getName()) - .log(Level.WARNING,"Skipping a non-existent permission",ex); - RobustReflectionConverter.addErrorInContext(context, ex); - } - reader.moveUp(); - } - - if (migrateHudson2324(as.grantedPermissions)) - OldDataMonitor.report(context, "1.301"); - - return as; - } - - protected GlobalMatrixAuthorizationStrategy create() { - return new GlobalMatrixAuthorizationStrategy(); - } - } - - public static class DescriptorImpl extends Descriptor { - protected DescriptorImpl(Class clazz) { - super(clazz); - } - - public DescriptorImpl() { - } - - public String getDisplayName() { - return Messages.GlobalMatrixAuthorizationStrategy_DisplayName(); - } - - @Override - public AuthorizationStrategy newInstance(StaplerRequest req, JSONObject formData) throws FormException { - GlobalMatrixAuthorizationStrategy gmas = create(); - for(Map.Entry r : (Set>)formData.getJSONObject("data").entrySet()) { - String sid = r.getKey(); - for(Map.Entry e : (Set>)r.getValue().entrySet()) { - if(e.getValue()) { - Permission p = Permission.fromId(e.getKey()); - gmas.add(p,sid); - } - } - } - return gmas; - } - - protected GlobalMatrixAuthorizationStrategy create() { - return new GlobalMatrixAuthorizationStrategy(); - } - - public List getAllGroups() { - List groups = new ArrayList(PermissionGroup.getAll()); - groups.remove(PermissionGroup.get(Permission.class)); - return groups; - } - - public boolean showPermission(Permission p) { - return p.getEnabled(); - } - - public FormValidation doCheckName(@QueryParameter String value ) throws IOException, ServletException { - return doCheckName_(value, Jenkins.getInstance(), Jenkins.ADMINISTER); - } - - public FormValidation doCheckName_(String value, AccessControlled subject, Permission permission) throws IOException, ServletException { - if(!subject.hasPermission(permission)) return FormValidation.ok(); // can't check - - final String v = value.substring(1,value.length()-1); - SecurityRealm sr = Jenkins.getInstance().getSecurityRealm(); - String ev = Functions.escape(v); - - if(v.equals("authenticated")) - // system reserved group - return FormValidation.respond(Kind.OK, makeImg("user.png") +ev); - - try { - try { - sr.loadUserByUsername(v); - return FormValidation.respond(Kind.OK, makeImg("person.png")+ev); - } catch (UserMayOrMayNotExistException e) { - // undecidable, meaning the user may exist - return FormValidation.respond(Kind.OK, ev); - } catch (UsernameNotFoundException e) { - // fall through next - } catch (DataAccessException e) { - // fall through next - } catch (AuthenticationException e) { - // other seemingly unexpected error. - return FormValidation.error(e,"Failed to test the validity of the user name "+v); - } - - try { - sr.loadGroupByGroupname(v); - return FormValidation.respond(Kind.OK, makeImg("user.png") +ev); - } catch (UserMayOrMayNotExistException e) { - // undecidable, meaning the group may exist - return FormValidation.respond(Kind.OK, ev); - } catch (UsernameNotFoundException e) { - // fall through next - } catch (DataAccessException e) { - // fall through next - } catch (AuthenticationException e) { - // other seemingly unexpected error. - return FormValidation.error(e,"Failed to test the validity of the group name "+v); - } - - // couldn't find it. it doesn't exist - return FormValidation.respond(Kind.ERROR, makeImg("error.png") +ev); - } catch (Exception e) { - // if the check fails miserably, we still want the user to be able to see the name of the user, - // so use 'ev' as the message - return FormValidation.error(e,ev); - } - } - - private String makeImg(String gif) { - return String.format("", Stapler.getCurrentRequest().getContextPath(), Jenkins.RESOURCE_PATH, gif); - } - } - - private static final Logger LOGGER = Logger.getLogger(GlobalMatrixAuthorizationStrategy.class.getName()); -} - diff --git a/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java b/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java index 9ebe8aa81f..0f7f3c0977 100644 --- a/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java +++ b/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java @@ -67,6 +67,10 @@ public class GlobalSecurityConfiguration extends ManagementLink { return Jenkins.getInstance().getSlaveAgentPort(); } + public boolean isDisableRememberMe() { + return Jenkins.getInstance().isDisableRememberMe(); + } + public synchronized void doConfigure(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { // for compatibility reasons, the actual value is stored in Jenkins BulkChange bc = new BulkChange(Jenkins.getInstance()); @@ -86,6 +90,7 @@ public class GlobalSecurityConfiguration extends ManagementLink { j.checkPermission(Jenkins.ADMINISTER); if (json.has("useSecurity")) { JSONObject security = json.getJSONObject("useSecurity"); + j.setDisableRememberMe(security.optBoolean("disableRememberMe", false)); j.setSecurityRealm(SecurityRealm.all().newInstanceFromRadioList(security, "realm")); j.setAuthorizationStrategy(AuthorizationStrategy.all().newInstanceFromRadioList(security, "authorization")); try { diff --git a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java index d7531637a2..40d4b43dbf 100644 --- a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java +++ b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java @@ -51,7 +51,6 @@ import org.acegisecurity.providers.encoding.PasswordEncoder; import org.acegisecurity.providers.encoding.ShaPasswordEncoder; import org.acegisecurity.userdetails.UserDetails; import org.acegisecurity.userdetails.UsernameNotFoundException; -import org.apache.tools.ant.taskdefs.email.Mailer; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.ForwardToView; import org.kohsuke.stapler.HttpResponse; @@ -73,7 +72,6 @@ import javax.servlet.http.HttpServletResponse; import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; import java.io.IOException; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.security.SecureRandom; import java.util.ArrayList; import java.util.Collections; @@ -280,9 +278,10 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea */ private void tryToMakeAdmin(User u) { AuthorizationStrategy as = Jenkins.getInstance().getAuthorizationStrategy(); - if (as instanceof GlobalMatrixAuthorizationStrategy) { - GlobalMatrixAuthorizationStrategy ma = (GlobalMatrixAuthorizationStrategy) as; - ma.add(Jenkins.ADMINISTER,u.getId()); + for (PermissionAdder adder : Jenkins.getInstance().getExtensionList(PermissionAdder.class)) { + if (adder.add(as, u, Jenkins.ADMINISTER)) { + return; + } } } diff --git a/core/src/main/java/hudson/security/PermissionAdder.java b/core/src/main/java/hudson/security/PermissionAdder.java new file mode 100644 index 0000000000..b2948356eb --- /dev/null +++ b/core/src/main/java/hudson/security/PermissionAdder.java @@ -0,0 +1,72 @@ +/* + * The MIT License + * + * Copyright 2013 Jesse Glick. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package hudson.security; + +import hudson.Extension; +import hudson.ExtensionPoint; +import hudson.model.User; +import java.util.logging.Level; +import java.util.logging.Logger; +import jenkins.model.Jenkins; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; + +/** + * Service which can add permissions for a given user to the configured authorization strategy. + * Useful e.g. to make the first user created in the system be automatically granted administer privilege. + * @since 1.535 + */ +public abstract class PermissionAdder implements ExtensionPoint { + + private static final Logger LOGGER = Logger.getLogger(PermissionAdder.class.getName()); + + /** + * Called to try to give a user global permission. + * @param strategy the configured authorization strategy + * @param user a user + * @param perm a permission to grant, such as {@link Jenkins#ADMINISTER} + * @return true if the permission was added, false if this service is incapable of handling it + */ + public abstract boolean add(AuthorizationStrategy strategy, User user, Permission perm); + + // TODO delete when 1.535 released and matrix-auth can depend on it + @Restricted(NoExternalUse.class) + @Extension public static final class Legacy extends PermissionAdder { + + @Override public boolean add(AuthorizationStrategy strategy, User user, Permission perm) { + try { + strategy.getClass().getMethod("add", Permission.class, String.class).invoke(strategy, Jenkins.ADMINISTER, user.getId()); + return true; + } catch (NoSuchMethodException x) { + // fine, not GlobalMatrixAuthorizationStrategy or a subclass + } catch (Exception x) { + LOGGER.log(Level.WARNING, null, x); + } + return false; + } + + } + +} diff --git a/core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java b/core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java deleted file mode 100644 index aeaf578f71..0000000000 --- a/core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc., Seiji Sogabe, Tom Huybrechts - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package hudson.security; - -import hudson.model.AbstractItem; -import hudson.model.Descriptor; -import jenkins.model.Jenkins; -import hudson.model.Item; -import hudson.model.ItemGroup; -import hudson.model.Job; -import hudson.util.RobustReflectionConverter; -import hudson.Extension; -import com.thoughtworks.xstream.io.HierarchicalStreamReader; -import com.thoughtworks.xstream.converters.UnmarshallingContext; -import com.thoughtworks.xstream.mapper.Mapper; -import com.thoughtworks.xstream.core.JVM; - -import java.util.HashSet; -import java.util.Set; - -/** - * {@link GlobalMatrixAuthorizationStrategy} plus per-project ACL. - * - *

    - * Per-project ACL is stored in {@link AuthorizationMatrixProperty}. - * - * @author Kohsuke Kawaguchi - */ -public class ProjectMatrixAuthorizationStrategy extends GlobalMatrixAuthorizationStrategy { - @Override - public ACL getACL(Job project) { - AuthorizationMatrixProperty amp = project.getProperty(AuthorizationMatrixProperty.class); - if (amp != null) { - return amp.getACL().newInheritingACL(getACL(project.getParent())); - } else { - return getACL(project.getParent()); - } - } - - public SidACL getACL(ItemGroup g) { - if (g instanceof Item) { - Item item = (Item) g; - return (SidACL)item.getACL(); - } - return getRootACL(); - } - - @Override - public SidACL getACL(AbstractItem item) { - return getACL(item.getParent()); - } - - @Override - public Set getGroups() { - Set r = new HashSet(); - r.addAll(super.getGroups()); - for (Job j : Jenkins.getInstance().getItems(Job.class)) { - AuthorizationMatrixProperty amp = j.getProperty(AuthorizationMatrixProperty.class); - if (amp != null) - r.addAll(amp.getGroups()); - } - return r; - } - - @Extension - public static final Descriptor DESCRIPTOR = new DescriptorImpl() { - @Override - protected GlobalMatrixAuthorizationStrategy create() { - return new ProjectMatrixAuthorizationStrategy(); - } - - @Override - public String getDisplayName() { - return Messages.ProjectMatrixAuthorizationStrategy_DisplayName(); - } - }; - - public static class ConverterImpl extends GlobalMatrixAuthorizationStrategy.ConverterImpl { - private RobustReflectionConverter ref; - - public ConverterImpl(Mapper m) { - ref = new RobustReflectionConverter(m,new JVM().bestReflectionProvider()); - } - - @Override - protected GlobalMatrixAuthorizationStrategy create() { - return new ProjectMatrixAuthorizationStrategy(); - } - - @Override - public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { - String name = reader.peekNextChild(); - if(name!=null && (name.equals("permission") || name.equals("useProjectSecurity"))) - // the proper serialization form - return super.unmarshal(reader, context); - else - // remain compatible with earlier problem where we used reflection converter - return ref.unmarshal(reader,context); - } - - @Override - public boolean canConvert(Class type) { - return type==ProjectMatrixAuthorizationStrategy.class; - } - } -} - diff --git a/core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java b/core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java index a1b9a8e9ca..f23699b758 100644 --- a/core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java +++ b/core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java @@ -100,11 +100,11 @@ public class DefaultCrumbIssuer extends CrumbIssuer { return false; } - private final String PROXY_HEADER = "X-Forwarded-For"; + private static final String X_FORWARDED_FOR = "X-Forwarded-For"; private String getClientIP(HttpServletRequest req) { String defaultAddress = req.getRemoteAddr(); - String forwarded = req.getHeader(PROXY_HEADER); + String forwarded = req.getHeader(X_FORWARDED_FOR); if (forwarded != null) { String[] hopList = forwarded.split(","); if (hopList.length >= 1) { diff --git a/core/src/main/java/hudson/tasks/ArtifactArchiver.java b/core/src/main/java/hudson/tasks/ArtifactArchiver.java index 5f47ce243f..7faa7b8986 100644 --- a/core/src/main/java/hudson/tasks/ArtifactArchiver.java +++ b/core/src/main/java/hudson/tasks/ArtifactArchiver.java @@ -31,14 +31,17 @@ import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.model.BuildListener; import hudson.model.Result; +import hudson.remoting.VirtualChannel; import hudson.util.FormValidation; +import java.io.File; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.AncestorInPath; import org.kohsuke.stapler.QueryParameter; -import java.io.File; import java.io.IOException; +import java.util.HashMap; +import java.util.Map; import net.sf.json.JSONObject; import javax.annotation.Nonnull; @@ -123,9 +126,6 @@ public class ArtifactArchiver extends Recorder { return true; } - File dir = build.getArtifactsDir(); - dir.mkdirs(); - listener.getLogger().println(Messages.ArtifactArchiver_ARCHIVING_ARTIFACTS()); try { FilePath ws = build.getWorkspace(); @@ -134,8 +134,13 @@ public class ArtifactArchiver extends Recorder { } String artifacts = build.getEnvironment(listener).expand(this.artifacts); - if(ws.copyRecursiveTo(artifacts,excludes,new FilePath(dir))==0) { - if(build.getResult().isBetterOrEqualTo(Result.UNSTABLE)) { + + Map files = ws.act(new ListFiles(artifacts, excludes)); + if (!files.isEmpty()) { + build.pickArtifactManager().archive(ws, launcher, listener, files); + } else { + Result result = build.getResult(); + if (result != null && result.isBetterOrEqualTo(Result.UNSTABLE)) { // If the build failed, don't complain that there was no matching artifact. // The build probably didn't even get to the point where it produces artifacts. listenerWarnOrError(listener, Messages.ArtifactArchiver_NoMatchFound(artifacts)); @@ -164,6 +169,23 @@ public class ArtifactArchiver extends Recorder { return true; } + private static final class ListFiles implements FilePath.FileCallable> { + private static final long serialVersionUID = 1; + private final String includes, excludes; + ListFiles(String includes, String excludes) { + this.includes = includes; + this.excludes = excludes; + } + @Override public Map invoke(File basedir, VirtualChannel channel) throws IOException, InterruptedException { + Map r = new HashMap(); + for (String f : Util.createFileSet(basedir, includes, excludes).getDirectoryScanner().getIncludedFiles()) { + f = f.replace(File.separatorChar, '/'); + r.put(f, f); + } + return r; + } + } + @Override public boolean prebuild(AbstractBuild build, BuildListener listener) { if(latestOnly) { @@ -175,14 +197,14 @@ public class ArtifactArchiver extends Recorder { bestResultSoFar = b.getResult(); } else { // remove old artifacts - File ad = b.getArtifactsDir(); - if(ad.exists()) { - listener.getLogger().println(Messages.ArtifactArchiver_DeletingOld(b.getDisplayName())); - try { - Util.deleteRecursive(ad); - } catch (IOException e) { - e.printStackTrace(listener.error(e.getMessage())); + try { + if (b.getArtifactManager().delete()) { + listener.getLogger().println(Messages.ArtifactArchiver_DeletingOld(b.getDisplayName())); } + } catch (IOException e) { + e.printStackTrace(listener.error(e.getMessage())); + } catch (InterruptedException x) { + x.printStackTrace(listener.error(x.getMessage())); } } } diff --git a/core/src/main/java/hudson/tasks/CommandInterpreter.java b/core/src/main/java/hudson/tasks/CommandInterpreter.java index fd9d3380a3..87228428ac 100644 --- a/core/src/main/java/hudson/tasks/CommandInterpreter.java +++ b/core/src/main/java/hudson/tasks/CommandInterpreter.java @@ -31,9 +31,12 @@ import hudson.model.AbstractBuild; import hudson.model.BuildListener; import hudson.model.Node; import hudson.model.TaskListener; +import hudson.remoting.ChannelClosedException; import java.io.IOException; import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.annotation.Nonnull; /** @@ -70,6 +73,7 @@ public abstract class CommandInterpreter extends Builder { throw new NullPointerException("no workspace from node " + node + " which is computer " + node.toComputer() + " and has channel " + node.getChannel()); } FilePath script=null; + int r = -1; try { try { script = createScriptFile(ws); @@ -79,7 +83,6 @@ public abstract class CommandInterpreter extends Builder { return false; } - int r; try { EnvVars envVars = build.getEnvironment(listener); // on Windows environment variables are converted to all upper case, @@ -90,18 +93,28 @@ public abstract class CommandInterpreter extends Builder { r = launcher.launch().cmds(buildCommandLine(script)).envs(envVars).stdout(listener).pwd(ws).join(); } catch (IOException e) { - Util.displayIOException(e,listener); + Util.displayIOException(e, listener); e.printStackTrace(listener.fatalError(Messages.CommandInterpreter_CommandFailed())); - r = -1; } return r==0; } finally { try { if(script!=null) - script.delete(); + script.delete(); } catch (IOException e) { - Util.displayIOException(e,listener); - e.printStackTrace( listener.fatalError(Messages.CommandInterpreter_UnableToDelete(script)) ); + if (r==-1 && e.getCause() instanceof ChannelClosedException) { + // JENKINS-5073 + // r==-1 only when the execution of the command resulted in IOException, + // and we've already reported that error. A common error there is channel + // losing a connection, and in that case we don't want to confuse users + // by reporting the 2nd problem. Technically the 1st exception may not be + // a channel closed error, but that's rare enough, and JENKINS-5073 is common enough + // that this suppressing of the error would be justified + LOGGER.log(Level.FINE, "Script deletion failed", e); + } else { + Util.displayIOException(e,listener); + e.printStackTrace( listener.fatalError(Messages.CommandInterpreter_UnableToDelete(script)) ); + } } catch (Exception e) { e.printStackTrace( listener.fatalError(Messages.CommandInterpreter_UnableToDelete(script)) ); } @@ -120,4 +133,6 @@ public abstract class CommandInterpreter extends Builder { protected abstract String getContents(); protected abstract String getFileExtension(); + + private static final Logger LOGGER = Logger.getLogger(CommandInterpreter.class.getName()); } diff --git a/core/src/main/java/hudson/tools/JDKInstaller.java b/core/src/main/java/hudson/tools/JDKInstaller.java index ac5e311dbb..66a4f10fd6 100644 --- a/core/src/main/java/hudson/tools/JDKInstaller.java +++ b/core/src/main/java/hudson/tools/JDKInstaller.java @@ -224,16 +224,33 @@ public class JDKInstaller extends ToolInstaller { */ String logFile = jdkBundle+".install.log"; - ArgumentListBuilder args = new ArgumentListBuilder(); - args.add(jdkBundle); - if (isJava15() || isJava14()) { - args.add("/s","/v/qn REBOOT=ReallySuppress INSTALLDIR=\""+ expectedLocation +"\" /L \""+logFile+"\""); - } else { - // modern version supports arguments in more sane format. - args.add("/s","/v","/qn","/L","\""+logFile+"\"","REBOOT=ReallySuppress","INSTALLDIR=\""+ expectedLocation+"\""); + expectedLocation = expectedLocation.trim(); + if (expectedLocation.endsWith("\\")) { + // Prevent a trailing slash from escaping quotes + expectedLocation = expectedLocation.substring(0, expectedLocation.length() - 1); + } + ArgumentListBuilder args = new ArgumentListBuilder(); + assert (new File(expectedLocation).exists()) : expectedLocation + + " must exist, otherwise /L will cause the installer to fail with error 1622"; + if (isJava15() || isJava14()) { + // Installer uses InstallShield. + args.add("CMD.EXE", "/C"); + + // CMD.EXE /C must be followed by a single parameter (do not split it!) + args.add(jdkBundle + " /s /v\"/qn REBOOT=ReallySuppress INSTALLDIR=\\\"" + + expectedLocation + "\\\" /L \\\"" + expectedLocation + + "\\jdk.exe.install.log\\\"\""); + } else { + // Installed uses Windows Installer (MSI) + args.add(jdkBundle, "/s"); + + // Create a private JRE by omitting "PublicjreFeature" + // @see http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#jdk-silent-installation + args.add("ADDLOCAL=\"ToolsFeature\""); + + args.add("REBOOT=ReallySuppress", "INSTALLDIR=" + expectedLocation, + "/L \\\"" + expectedLocation + "\\jdk.exe.install.log\\\""); } - // according to http://community.acresso.com/showthread.php?t=83301, \" is the trick to quote values with whitespaces. - // Oh Windows, oh windows, why do you have to be so difficult? int r = launcher.launch().cmds(args).stdout(out) .pwd(new FilePath(launcher.getChannel(), expectedLocation)).join(); if (r != 0) { diff --git a/core/src/main/java/hudson/util/ArgumentListBuilder.java b/core/src/main/java/hudson/util/ArgumentListBuilder.java index e52bd63e15..d89744a413 100644 --- a/core/src/main/java/hudson/util/ArgumentListBuilder.java +++ b/core/src/main/java/hudson/util/ArgumentListBuilder.java @@ -234,7 +234,7 @@ public class ArgumentListBuilder implements Serializable, Cloneable { * * @param original Resolution will be delegated to this resolver. Resolved * values will be escaped afterwards. - * @see https://issues.jenkins-ci.org/browse/JENKINS-10539 + * @see JENKINS-10539 */ private static VariableResolver propertiesGeneratingResolver(final VariableResolver original) { diff --git a/core/src/main/java/hudson/util/DirScanner.java b/core/src/main/java/hudson/util/DirScanner.java index c11ae9c622..87c97fa326 100644 --- a/core/src/main/java/hudson/util/DirScanner.java +++ b/core/src/main/java/hudson/util/DirScanner.java @@ -26,29 +26,36 @@ public abstract class DirScanner implements Serializable { */ public abstract void scan(File dir, FileVisitor visitor) throws IOException; + /** + * @since 1.532 + */ + protected final void scanSingle(File f, String relative, FileVisitor visitor) throws IOException { + if (visitor.understandsSymlink()) { + try { + String target; + try { + target = Util.resolveSymlink(f); + } catch (IOException x) { // JENKINS-13202 + target = null; + } + if (target != null) { + visitor.visitSymlink(f, target, relative); + return; + } + } catch (InterruptedException e) { + throw (IOException) new InterruptedIOException().initCause(e); + } + } + visitor.visit(f, relative); + } + /** * Scans everything recursively. */ public static class Full extends DirScanner { private void scan(File f, String path, FileVisitor visitor) throws IOException { if (f.canRead()) { - if (visitor.understandsSymlink()) { - try { - String target; - try { - target = Util.resolveSymlink(f); - } catch (IOException x) { // JENKINS-13202 - target = null; - } - if (target!=null) { - visitor.visitSymlink(f,target,path+f.getName()); - return; - } - } catch (InterruptedException e) { - throw (IOException)new InterruptedIOException().initCause(e); - } - } - visitor.visit(f,path+f.getName()); + scanSingle(f, path + f.getName(), visitor); if(f.isDirectory()) { for( File child : f.listFiles() ) scan(child,path+f.getName()+'/',visitor); @@ -113,24 +120,7 @@ public abstract class DirScanner implements Serializable { DirectoryScanner ds = fs.getDirectoryScanner(new org.apache.tools.ant.Project()); for( String f : ds.getIncludedFiles()) { File file = new File(dir, f); - - if (visitor.understandsSymlink()) { - try { - String target; - try { - target = Util.resolveSymlink(file); - } catch (IOException x) { // JENKINS-13202 - target = null; - } - if (target!=null) { - visitor.visitSymlink(file,target,f); - continue; - } - } catch (InterruptedException e) { - throw (IOException)new InterruptedIOException().initCause(e); - } - } - visitor.visit(file,f); + scanSingle(file, f, visitor); } } } diff --git a/core/src/main/java/hudson/util/RunList.java b/core/src/main/java/hudson/util/RunList.java index c86b0b0da5..b8d8acaf10 100644 --- a/core/src/main/java/hudson/util/RunList.java +++ b/core/src/main/java/hudson/util/RunList.java @@ -32,19 +32,11 @@ import hudson.model.Job; import hudson.model.Node; import hudson.model.Result; import hudson.model.Run; +import hudson.model.TopLevelItem; import hudson.model.View; import hudson.util.Iterators.CountingPredicate; -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.GregorianCalendar; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; +import java.util.*; /** * {@link List} of {@link Run}s, sorted in the descending date order. @@ -67,12 +59,15 @@ public class RunList extends AbstractList { } public RunList(View view) {// this is a type unsafe operation - List> jobs = new ArrayList>(); - for (Item item : view.getItems()) - for (Job j : item.getAllJobs()) - jobs.add(((Job)j).getBuilds()); + Set jobs = new HashSet(); + for (TopLevelItem item : view.getItems()) + jobs.addAll(item.getAllJobs()); - this.base = combine(jobs); + List> runs = new ArrayList>(); + for (Job job : jobs) { + runs.add(job.getBuilds()); + } + this.base = combine(runs); } public RunList(Collection jobs) { diff --git a/core/src/main/java/jenkins/model/ArtifactManager.java b/core/src/main/java/jenkins/model/ArtifactManager.java new file mode 100644 index 0000000000..d327acfd8c --- /dev/null +++ b/core/src/main/java/jenkins/model/ArtifactManager.java @@ -0,0 +1,82 @@ +/* + * The MIT License + * + * Copyright 2013 Jesse Glick. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package jenkins.model; + +import hudson.FilePath; +import hudson.Launcher; +import hudson.model.AbstractBuild; +import hudson.model.BuildListener; +import hudson.model.Run; +import hudson.tasks.ArtifactArchiver; +import java.io.IOException; +import java.util.Map; +import jenkins.util.VirtualFile; + +/** + * Manager of artifacts for one build. + * @see ArtifactManagerFactory + * @since 1.532 + */ +public abstract class ArtifactManager { + + /** + * Called when this manager is loaded from disk. + * The selected manager will be persisted inside a build, so the build reference should be {@code transient} (quasi-{@code final}) and restored here. + * @param build a historical build with which this manager was associated + */ + public abstract void onLoad(Run build); + + /** + * Archive all configured artifacts from a build. + *

    If called multiple times for the same build, do not delete the old artifacts but keep them all, unless overwritten. + * For example, the XVNC plugin could use this to save {@code screenshot.jpg} if so configured. + *

    This method is typically invoked on a running build, though e.g. in the case of Maven module builds, + * the build may actually be {@link hudson.model.Run.State#COMPLETED} when this is called + * (since it is the parent build which is still running and performing archiving). + * @param workspace the root directory from which to copy files (typically {@link AbstractBuild#getWorkspace} but not necessarily) + * @param launcher a launcher to use if external processes need to be forked + * @param listener a way to print messages about progress or problems + * @param artifacts map from paths in the archive area to paths relative to {@code workspace} (all paths {@code /}-separated) + * @throws IOException if transfer or copying failed in any way + * @throws InterruptedException if transfer was interrupted + * @see ArtifactArchiver#perform(AbstractBuild, Launcher, BuildListener) + */ + public abstract void archive(FilePath workspace, Launcher launcher, BuildListener listener, Map artifacts) throws IOException, InterruptedException; + + /** + * Delete all artifacts associated with an earlier build (if any). + * @return true if there was actually anything to delete + * @throws IOException if deletion could not be completed + * @throws InterruptedException if deletion was interrupted + */ + public abstract boolean delete() throws IOException, InterruptedException; + + /** + * Returns a representation of the root directory of archived artifacts. + * @return the archive root + */ + public abstract VirtualFile root(); + +} diff --git a/core/src/main/java/jenkins/model/ArtifactManagerConfiguration.java b/core/src/main/java/jenkins/model/ArtifactManagerConfiguration.java new file mode 100644 index 0000000000..c2bb1135dd --- /dev/null +++ b/core/src/main/java/jenkins/model/ArtifactManagerConfiguration.java @@ -0,0 +1,68 @@ +/* + * The MIT License + * + * Copyright 2013 Jesse Glick. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package jenkins.model; + +import hudson.Extension; +import hudson.util.DescribableList; +import java.io.IOException; +import net.sf.json.JSONObject; +import org.kohsuke.stapler.StaplerRequest; + +/** + * List of configured {@link ArtifactManagerFactory}s. + * @since 1.532 + */ +@Extension +public class ArtifactManagerConfiguration extends GlobalConfiguration { + + public static ArtifactManagerConfiguration get() { + return Jenkins.getInstance().getInjector().getInstance(ArtifactManagerConfiguration.class); + } + + private final DescribableList artifactManagerFactories = new DescribableList(this); + + public ArtifactManagerConfiguration() { + load(); + } + + private Object readResolve() { + artifactManagerFactories.setOwner(this); + return this; + } + + public DescribableList getArtifactManagerFactories() { + return artifactManagerFactories; + } + + @Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { + try { + artifactManagerFactories.rebuildHetero(req, json, ArtifactManagerFactoryDescriptor.all(), "artifactManagerFactories"); + return true; + } catch (IOException x) { + throw new FormException(x, "artifactManagerFactories"); + } + } + +} diff --git a/core/src/main/java/jenkins/model/ArtifactManagerFactory.java b/core/src/main/java/jenkins/model/ArtifactManagerFactory.java new file mode 100644 index 0000000000..f0d08c4e05 --- /dev/null +++ b/core/src/main/java/jenkins/model/ArtifactManagerFactory.java @@ -0,0 +1,56 @@ +/* + * The MIT License + * + * Copyright 2013 Jesse Glick. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package jenkins.model; + +import hudson.ExtensionPoint; +import hudson.model.AbstractDescribableImpl; +import hudson.model.Run; +import javax.annotation.CheckForNull; +import org.kohsuke.stapler.DataBoundConstructor; + +/** + * Pluggable ability to manage transfer and/or storage of build artifacts. + * The descriptor should specify at least a display name, and optionally a {@code config} view. + * Since the user can configure this class, you must have a {@link DataBoundConstructor}. + * @see ArtifactManagerConfiguration + * @see ArtifactManagerFactoryDescriptor + * @since 1.532 + */ +public abstract class ArtifactManagerFactory extends AbstractDescribableImpl implements ExtensionPoint { + + /** + * Optionally creates a manager for a particular build. + * All configured factories are consulted in sequence; the first manager thus yielded (if any) will be stored in the build. + * {@link StandardArtifactManager} is used as a fallback. + * @param build a running (or recently completed) build ready for {@link ArtifactManager#archive} + * @return a manager, or null if this manager should not handle this kind of project, builds on this kind of slave, etc. + */ + public abstract @CheckForNull ArtifactManager managerFor(Run build); + + @Override public ArtifactManagerFactoryDescriptor getDescriptor() { + return (ArtifactManagerFactoryDescriptor) super.getDescriptor(); + } + +} diff --git a/test/src/test/java/hudson/maven/ResultExposingBuilder.java b/core/src/main/java/jenkins/model/ArtifactManagerFactoryDescriptor.java similarity index 60% rename from test/src/test/java/hudson/maven/ResultExposingBuilder.java rename to core/src/main/java/jenkins/model/ArtifactManagerFactoryDescriptor.java index 2bc74dd15d..2cf15af1a5 100644 --- a/test/src/test/java/hudson/maven/ResultExposingBuilder.java +++ b/core/src/main/java/jenkins/model/ArtifactManagerFactoryDescriptor.java @@ -1,18 +1,18 @@ /* * The MIT License - * - * Copyright (c) 2013, Dominik Bartholdi - * + * + * Copyright 2013 Jesse Glick. + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,32 +21,21 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package hudson.maven; -import hudson.Launcher; -import hudson.model.BuildListener; -import hudson.model.Result; -import hudson.model.AbstractBuild; -import hudson.tasks.Builder; +package jenkins.model; -import java.io.IOException; +import hudson.DescriptorExtensionList; +import hudson.model.Descriptor; /** - * @author Dominik Bartholdi (imod) + * Definition of a kind of artifact manager. + * @see ArtifactManagerFactory + * @since 1.532 */ -public class ResultExposingBuilder extends Builder { - private Result result; +public abstract class ArtifactManagerFactoryDescriptor extends Descriptor { - public ResultExposingBuilder() { + public static DescriptorExtensionList all() { + return Jenkins.getInstance().getDescriptorList(ArtifactManagerFactory.class); } - @Override - public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { - result = build.getResult(); - return super.perform(build, launcher, listener); - } - - public Result getResult() { - return result; - } -} \ No newline at end of file +} diff --git a/core/src/main/java/jenkins/model/CoreEnvironmentContributor.java b/core/src/main/java/jenkins/model/CoreEnvironmentContributor.java index e6e47c91c0..5c58a90e82 100644 --- a/core/src/main/java/jenkins/model/CoreEnvironmentContributor.java +++ b/core/src/main/java/jenkins/model/CoreEnvironmentContributor.java @@ -24,6 +24,11 @@ import java.io.IOException; public class CoreEnvironmentContributor extends EnvironmentContributor { @Override public void buildEnvironmentFor(Run r, EnvVars env, TaskListener listener) throws IOException, InterruptedException { + Computer c = Computer.currentComputer(); + if (c!=null){ + EnvVars compEnv = c.getEnvironment().overrideAll(env); + env.putAll(compEnv); + } env.put("BUILD_DISPLAY_NAME",r.getDisplayName()); Jenkins j = Jenkins.getInstance(); @@ -35,12 +40,6 @@ public class CoreEnvironmentContributor extends EnvironmentContributor { @Override public void buildEnvironmentFor(Job j, EnvVars env, TaskListener listener) throws IOException, InterruptedException { - Computer c = Computer.currentComputer(); - if (c!=null){ - EnvVars compEnv = c.getEnvironment().overrideAll(env); - env.putAll(compEnv); - } - Jenkins jenkins = Jenkins.getInstance(); String rootUrl = jenkins.getRootUrl(); if(rootUrl!=null) { diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java index 86b908604f..a54364e984 100755 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -378,6 +378,13 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro * @see #setSecurityRealm(SecurityRealm) */ private volatile SecurityRealm securityRealm = SecurityRealm.NO_AUTHENTICATION; + + /** + * Disables the remember me on this computer option in the standard login screen. + * + * @since 1.534 + */ + private volatile boolean disableRememberMe; /** * The project naming strategy defines/restricts the names which can be given to a project/job. e.g. does the name have to follow a naming convention? @@ -1907,7 +1914,12 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro public String getRootUrlFromRequest() { StaplerRequest req = Stapler.getCurrentRequest(); StringBuilder buf = new StringBuilder(); - buf.append(req.getScheme()+"://"); + String scheme = req.getScheme(); + String forwardedScheme = req.getHeader("X-Forwarded-Proto"); + if (forwardedScheme != null) { + scheme = forwardedScheme; + } + buf.append(scheme+"://"); buf.append(req.getServerName()); if(req.getServerPort()!=80) buf.append(':').append(req.getServerPort()); @@ -2056,6 +2068,14 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro authorizationStrategy = a; } + public boolean isDisableRememberMe() { + return disableRememberMe; + } + + public void setDisableRememberMe(boolean disableRememberMe) { + this.disableRememberMe = disableRememberMe; + } + public void disableSecurity() { useSecurity = null; setSecurityRealm(SecurityRealm.NO_AUTHENTICATION); diff --git a/core/src/main/java/jenkins/model/PeepholePermalink.java b/core/src/main/java/jenkins/model/PeepholePermalink.java index 397d035743..b4667d32a9 100644 --- a/core/src/main/java/jenkins/model/PeepholePermalink.java +++ b/core/src/main/java/jenkins/model/PeepholePermalink.java @@ -134,6 +134,11 @@ public abstract class PeepholePermalink extends Permalink implements PredicateId symlink + Util.createSymlink(job.getBuildDir(),b.getId(),target,TaskListener.NULL); + } writeSymlink(cache, String.valueOf(n)); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to update "+job+" "+getId()+" permalink for " + b, e); diff --git a/core/src/main/java/jenkins/model/ProjectNamingStrategy.java b/core/src/main/java/jenkins/model/ProjectNamingStrategy.java index b37343dc74..31e4b9e81f 100644 --- a/core/src/main/java/jenkins/model/ProjectNamingStrategy.java +++ b/core/src/main/java/jenkins/model/ProjectNamingStrategy.java @@ -30,6 +30,7 @@ import hudson.Util; import hudson.model.Describable; import hudson.model.Descriptor; import hudson.model.Failure; +import jenkins.model.Messages; import hudson.util.FormValidation; import java.io.IOException; @@ -132,19 +133,30 @@ public abstract class ProjectNamingStrategy implements Describable build; + + public StandardArtifactManager(Run build) { + onLoad(build); + } + + @Override public final void onLoad(Run build) { + this.build = build; + } + + @Override public void archive(FilePath workspace, Launcher launcher, BuildListener listener, final Map artifacts) throws IOException, InterruptedException { + File dir = getArtifactsDir(); + String description = "transfer of " + artifacts.size() + " files"; // TODO improve when just one file + workspace.copyRecursiveTo(new FilePath.ExplicitlySpecifiedDirScanner(artifacts), new FilePath(dir), description); + } + + @Override public final boolean delete() throws IOException, InterruptedException { + File ad = getArtifactsDir(); + if (!ad.exists()) { + return false; + } + Util.deleteRecursive(ad); + return true; + } + + @Override public VirtualFile root() { + return VirtualFile.forFile(getArtifactsDir()); + } + + @SuppressWarnings("deprecation") + private File getArtifactsDir() { + return build.getArtifactsDir(); + } + +} diff --git a/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java b/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java index 9e25bd76df..92561a23a4 100644 --- a/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java +++ b/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java @@ -498,6 +498,13 @@ public abstract class AbstractLazyLoadRunMap extends AbstractMap i } return getById(idOnDisk.get(lo-1)); case EXACT: + if (hi<=0) return null; + R r = load(idOnDisk.get(hi-1), null); + if (r==null) return null; + + int found = getNumberOf(r); + if (found==n) + return r; // exact match return null; default: throw new AssertionError(); @@ -716,7 +723,11 @@ public abstract class AbstractLazyLoadRunMap extends AbstractMap i public synchronized boolean removeValue(R run) { Index copy = copy(); - copy.byNumber.remove(getNumberOf(run)); + int n = getNumberOf(run); + copy.byNumber.remove(n); + SortedIntList a = new SortedIntList(numberOnDisk); + a.removeValue(n); + numberOnDisk = a; BuildReference old = copy.byId.remove(getIdOf(run)); this.index = copy; diff --git a/core/src/main/java/jenkins/scm/SCMCheckoutStrategyDescriptor.java b/core/src/main/java/jenkins/scm/SCMCheckoutStrategyDescriptor.java index fc477dee6b..4524fa93ac 100644 --- a/core/src/main/java/jenkins/scm/SCMCheckoutStrategyDescriptor.java +++ b/core/src/main/java/jenkins/scm/SCMCheckoutStrategyDescriptor.java @@ -2,13 +2,10 @@ package jenkins.scm; import com.google.common.collect.Lists; import hudson.DescriptorExtensionList; -import hudson.matrix.MatrixExecutionStrategyDescriptor; import hudson.model.AbstractProject; import hudson.model.Descriptor; -import hudson.scm.SCM; import jenkins.model.Jenkins; -import java.util.ArrayList; import java.util.List; /** @@ -30,7 +27,7 @@ public abstract class SCMCheckoutStrategyDescriptor extends Descriptor all() { return Jenkins.getInstance().getDescriptorList(SCMCheckoutStrategy.class); diff --git a/core/src/main/java/jenkins/util/VirtualFile.java b/core/src/main/java/jenkins/util/VirtualFile.java new file mode 100644 index 0000000000..e0180f6ded --- /dev/null +++ b/core/src/main/java/jenkins/util/VirtualFile.java @@ -0,0 +1,356 @@ +/* + * The MIT License + * + * Copyright 2013 Jesse Glick. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package jenkins.util; + +import hudson.FilePath; +import hudson.model.DirectoryBrowserSupport; +import hudson.remoting.Channel; +import hudson.remoting.VirtualChannel; +import hudson.util.DirScanner; +import hudson.util.FileVisitor; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Nonnull; + +/** + * Abstraction over {@link File}, {@link FilePath}, or other items such as network resources or ZIP entries. + * Assumed to be read-only and makes very limited assumptions, just enough to display content and traverse directories. + * + *

    + * To obtain a {@link VirtualFile} representation for an existing file, use {@link #forFile(File)} or {@link FilePath#toVirtualFile()} + * + *

    How are VirtualFile and FilePath different?

    + *

    + * FilePath abstracts away {@link File}s on machines that are connected over {@link Channel}, whereas + * {@link VirtualFile} makes no assumption about where the actual files are, or whether there really exists + * {@link File}s somewhere. This makes VirtualFile more abstract. + * + * @see DirectoryBrowserSupport + * @see FilePath + * @since 1.532 + */ +public abstract class VirtualFile implements Comparable { + + /** + * Gets the base name, meaning just the last portion of the path name without any + * directories. + * + * For a “root directory” this may be the empty string. + * @return a simple name (no slashes) + */ + public abstract @Nonnull String getName(); + + /** + * Gets a URI. + * Should at least uniquely identify this virtual file within its root, but not necessarily globally. + * @return a URI (need not be absolute) + */ + public abstract URI toURI(); + + /** + * Gets the parent file. + * Need only operate within the originally given root. + * @return the parent + */ + public abstract VirtualFile getParent(); + + /** + * Checks whether this file exists and is a directory. + * @return true if it is a directory, false if a file or nonexistent + * @throws IOException in case checking status failed + */ + public abstract boolean isDirectory() throws IOException; + + /** + * Checks whether this file exists and is a plain file. + * @return true if it is a file, false if a directory or nonexistent + * @throws IOException in case checking status failed + */ + public abstract boolean isFile() throws IOException; + + /** + * Checks whether this file exists. + * @return true if it is a plain file or directory, false if nonexistent + * @throws IOException in case checking status failed + */ + public abstract boolean exists() throws IOException; + + /** + * Lists children of this directory. + * @return a list of children (files and subdirectories); empty for a file or nonexistent directory + * @throws IOException if this directory exists but listing was not possible for some other reason + */ + public abstract @Nonnull VirtualFile[] list() throws IOException; + + /** + * Lists recursive files of this directory with pattern matching. + * @param glob an Ant-style glob + * @return a list of relative names of children (files directly inside or in subdirectories) + * @throws IOException if this is not a directory, or listing was not possible for some other reason + */ + public abstract @Nonnull String[] list(String glob) throws IOException; + + /** + * Obtains a child file. + * @param name a relative path, possibly including {@code /} (but not {@code ..}) + * @return a representation of that child, whether it actually exists or not + */ + public abstract @Nonnull VirtualFile child(@Nonnull String name); + + /** + * Gets the file length. + * @return a length, or 0 if inapplicable (e.g. a directory) + * @throws IOException if checking the length failed + */ + public abstract long length() throws IOException; + + /** + * Gets the file timestamp. + * @return a length, or 0 if inapplicable + * @throws IOException if checking the timestamp failed + */ + public abstract long lastModified() throws IOException; + + /** + * Checks whether this file can be read. + * @return true normally + * @throws IOException if checking status failed + */ + public abstract boolean canRead() throws IOException; + + /** + * Opens an input stream on the file so its contents can be read. + * @return an open stream + * @throws IOException if it could not be opened + */ + public abstract InputStream open() throws IOException; + + /** + * Does case-insensitive comparison. + * @inheritDoc + */ + @Override public final int compareTo(VirtualFile o) { + return getName().compareToIgnoreCase(o.getName()); + } + + /** + * Compares according to {@link #toURI}. + * @inheritDoc + */ + @Override public final boolean equals(Object obj) { + return obj instanceof VirtualFile && toURI().equals(((VirtualFile) obj).toURI()); + } + + /** + * Hashes according to {@link #toURI}. + * @inheritDoc + */ + @Override public final int hashCode() { + return toURI().hashCode(); + } + + /** + * Displays {@link #toURI}. + * @inheritDoc + */ + @Override public final String toString() { + return toURI().toString(); + } + + /** + * Creates a virtual file wrapper for a local file. + * @param f a disk file (need not exist) + * @return a wrapper + */ + public static VirtualFile forFile(final File f) { + return new VirtualFile() { + @Override public String getName() { + return f.getName(); + } + @Override public URI toURI() { + return f.toURI(); + } + @Override public VirtualFile getParent() { + return forFile(f.getParentFile()); + } + @Override public boolean isDirectory() throws IOException { + return f.isDirectory(); + } + @Override public boolean isFile() throws IOException { + return f.isFile(); + } + @Override public boolean exists() throws IOException { + return f.exists(); + } + @Override public VirtualFile[] list() throws IOException { + File[] kids = f.listFiles(); + if (kids == null) { + return new VirtualFile[0]; + } + VirtualFile[] vfs = new VirtualFile[kids.length]; + for (int i = 0; i < kids.length; i++) { + vfs[i] = forFile(kids[i]); + } + return vfs; + } + @Override public String[] list(String glob) throws IOException { + return new Scanner(glob).invoke(f, null); + } + @Override public VirtualFile child(String name) { + return forFile(new File(f, name)); + } + @Override public long length() throws IOException { + return f.length(); + } + @Override public long lastModified() throws IOException { + return f.lastModified(); + } + @Override public boolean canRead() throws IOException { + return f.canRead(); + } + @Override public InputStream open() throws IOException { + return new FileInputStream(f); + } + }; + } + + /** + * Creates a virtual file wrapper for a remotable file. + * @param f a local or remote file (need not exist) + * @return a wrapper + */ + public static VirtualFile forFilePath(final FilePath f) { + return new VirtualFile() { + @Override public String getName() { + return f.getName(); + } + @Override public URI toURI() { + try { + return f.toURI(); + } catch (Exception x) { + return URI.create(f.getRemote()); + } + } + @Override public VirtualFile getParent() { + return f.getParent().toVirtualFile(); + } + @Override public boolean isDirectory() throws IOException { + try { + return f.isDirectory(); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public boolean isFile() throws IOException { + // TODO should probably introduce a method for this purpose + return exists() && !isDirectory(); + } + @Override public boolean exists() throws IOException { + try { + return f.exists(); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public VirtualFile[] list() throws IOException { + try { + List kids = f.list(); + if (kids == null) { + return new VirtualFile[0]; + } + VirtualFile[] vfs = new VirtualFile[kids.size()]; + for (int i = 0; i < vfs.length; i++) { + vfs[i] = forFilePath(kids.get(i)); + } + return vfs; + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public String[] list(String glob) throws IOException { + try { + return f.act(new Scanner(glob)); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public VirtualFile child(String name) { + return forFilePath(f.child(name)); + } + @Override public long length() throws IOException { + try { + return f.length(); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public long lastModified() throws IOException { + try { + return f.lastModified(); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public boolean canRead() throws IOException { + try { + return f.act(new Readable()); + } catch (InterruptedException x) { + throw (IOException) new IOException(x.toString()).initCause(x); + } + } + @Override public InputStream open() throws IOException { + return f.read(); + } + }; + } + private static final class Scanner implements FilePath.FileCallable { + private final String glob; + Scanner(String glob) { + this.glob = glob; + } + @Override public String[] invoke(File f, VirtualChannel channel) throws IOException { + final List paths = new ArrayList(); + new DirScanner.Glob(glob, null).scan(f, new FileVisitor() { + @Override + public void visit(File f, String relativePath) throws IOException { + paths.add(relativePath); + } + }); + return paths.toArray(new String[paths.size()]); + } + + } + private static final class Readable implements FilePath.FileCallable { + @Override public Boolean invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { + return f.canRead(); + } + } + +} diff --git a/core/src/main/resources/hudson/PluginManager/table.jelly b/core/src/main/resources/hudson/PluginManager/table.jelly index 377dc607e2..97b2c8211e 100644 --- a/core/src/main/resources/hudson/PluginManager/table.jelly +++ b/core/src/main/resources/hudson/PluginManager/table.jelly @@ -103,6 +103,12 @@ THE SOFTWARE.

    ${%coreWarning(p.requiredCore)}
    + +
    ${%depCompatWarning}
    +
    + +
    ${%depCoreWarning(p.getNeededDependenciesRequiredCore().toString())}
    +
    diff --git a/core/src/main/resources/hudson/PluginManager/table.properties b/core/src/main/resources/hudson/PluginManager/table.properties index fa476d7aad..d9fa3b7a2f 100644 --- a/core/src/main/resources/hudson/PluginManager/table.properties +++ b/core/src/main/resources/hudson/PluginManager/table.properties @@ -25,3 +25,13 @@ compatWarning=\ coreWarning=\ Warning: This plugin is built for Jenkins {0} or newer. \ It may or may not work in your Jenkins. +depCompatWarning=\ + Warning: This plugin requires dependent plugins be upgraded \ + and some of these dependent plugins are not compatible \ + with the current installed version. Jobs using these \ + dependent plugins may need to be reconfigured. +depCoreWarning=\ + Warning: This plugin requires dependent plugins that are \ + built for Jenkins {0} or newer. The dependent plugins may \ + or may not work in your Jenkins and consenquently this \ + plugin may or may not work in your Jenkins. diff --git a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly index d4bcdae590..e0259987ff 100644 --- a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly +++ b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly @@ -27,7 +27,7 @@ THE SOFTWARE. --> - + diff --git a/core/src/main/resources/hudson/model/AbstractProject/main.jelly b/core/src/main/resources/hudson/model/AbstractProject/main.jelly index 8f5d883e82..8400f08519 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/main.jelly +++ b/core/src/main/resources/hudson/model/AbstractProject/main.jelly @@ -31,7 +31,7 @@ THE SOFTWARE. - + @@ -53,7 +53,7 @@ THE SOFTWARE. - + ${%Latest Test Result} @@ -61,13 +61,16 @@ THE SOFTWARE. - - - - ${%Latest Aggregated Test Result} - - - + + + + + ${%Latest Aggregated Test Result} + + + + +
    diff --git a/core/src/main/resources/hudson/model/Job/index.jelly b/core/src/main/resources/hudson/model/Job/index.jelly index 9e3c5becd4..626c258c7c 100644 --- a/core/src/main/resources/hudson/model/Job/index.jelly +++ b/core/src/main/resources/hudson/model/Job/index.jelly @@ -24,7 +24,7 @@ THE SOFTWARE. - +

    ${it.pronoun}

    diff --git a/core/src/main/resources/hudson/model/Messages.properties b/core/src/main/resources/hudson/model/Messages.properties index 03bf5d9416..97b545a640 100644 --- a/core/src/main/resources/hudson/model/Messages.properties +++ b/core/src/main/resources/hudson/model/Messages.properties @@ -102,6 +102,7 @@ CLI.wait-node-offline.shortDescription=Wait for a node to become offline Computer.Caption=Slave {0} Computer.NoSuchSlaveExists=No such slave "{0}" exists. Did you mean "{1}"? Computer.Permissions.Title=Slave +Computer.ExtendedReadPermission.Description=This permission allows users to read slave configuration. Computer.ConfigurePermission.Description=This permission allows users to configure slaves. Computer.DeletePermission.Description=This permission allows users to delete existing slaves. Computer.CreatePermission.Description=This permission allows users to create slaves. diff --git a/core/src/main/resources/hudson/model/View/index.jelly b/core/src/main/resources/hudson/model/View/index.jelly index 0e0ebffe7c..464262f320 100644 --- a/core/src/main/resources/hudson/model/View/index.jelly +++ b/core/src/main/resources/hudson/model/View/index.jelly @@ -24,19 +24,17 @@ THE SOFTWARE. - +
    -
    -
    - +
    diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config.jelly b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config.jelly deleted file mode 100644 index b3a219bc7a..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config.jelly +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_da.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_da.properties deleted file mode 100644 index b51d973595..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_da.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=Sl\u00e5 projektbaseret adgangskontrol til diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_de.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_de.properties deleted file mode 100644 index 09962dfad5..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_de.properties +++ /dev/null @@ -1 +0,0 @@ -Enable\ project-based\ security=Projektbasierte Sicherheit aktivieren diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_es.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_es.properties deleted file mode 100644 index ff2d46965a..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_es.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=Habilitar seguridad en el projecto diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_fr.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_fr.properties deleted file mode 100644 index eaa01eb9fd..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_fr.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=Activer la sécurité basée projet diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_ja.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_ja.properties deleted file mode 100644 index 3adb7b6870..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_ja.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=\u6A29\u9650\u8A2D\u5B9A(\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5358\u4F4D)\u306E\u6709\u52B9\u5316 diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_pt_BR.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_pt_BR.properties deleted file mode 100644 index 55c8f8103e..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_pt_BR.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Reginaldo L. Russinholi, Cleiber Silva -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=Habilitar seguran\u00e7a baseada em projeto diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_tr.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_tr.properties deleted file mode 100644 index bcc98aa2a1..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_tr.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oguz Dag -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=Proje tabanl\u0131 g\u00fcvenlik ayarlar\u0131n\u0131 devreye al diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_CN.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_CN.properties deleted file mode 100644 index d7d400a618..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_CN.properties +++ /dev/null @@ -1 +0,0 @@ -Enable\ project-based\ security=\u542f\u7528\u9879\u76ee\u5b89\u5168 diff --git a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_TW.properties b/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_TW.properties deleted file mode 100644 index cac3d883ea..0000000000 --- a/core/src/main/resources/hudson/security/AuthorizationMatrixProperty/config_zh_TW.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Enable\ project-based\ security=\u555f\u7528\u5c08\u6848\u578b\u5b89\u5168\u6027\u8a2d\u5b9a diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly deleted file mode 100644 index 51a70d8ea0..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - ${title} - - - - - - - - - - - - ${%Toggle all} - - - - ${%Remove user/group} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - ${%User/group} - - ${g.title} - -
    - ${p.name} -
    - - - -
    - ${%User/group to add}: - - - - [help] -
    - -
    -
    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_da.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_da.properties deleted file mode 100644 index 78c79a33cb..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_da.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Anonymous=Anonym -User/group\ to\ add=Brugergruppe der skal tilf\u00f8jes -Add=Tilf\u00f8j -Remove\ user/group=Fjern user/gruppe -User/group=Bruger/gruppe diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_de.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_de.properties deleted file mode 100644 index 09e5858300..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_de.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Simon Wiest -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=Nutzer/Gruppe entfernen -Toggle\ all=Alles ausw\u00E4hlen -User/group=Benutzer/Gruppe -Anonymous=Anonym -User/group\ to\ add=Weitere Benutzer/Gruppe -Add=Hinzufügen diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_es.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_es.properties deleted file mode 100644 index 3ef3712be8..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_es.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -User/group=Usuario/Grupo -Anonymous=Anónimo -User/group\ to\ add=Usuario/Grupo para añadir -Add=Añadir -Remove\ user/group=Borrar usuario/grupo -Toggle\ all=Cambiar todo diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fi.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fi.properties deleted file mode 100644 index f293ef2a6e..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fi.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=Poista k\u00E4ytt\u00E4j\u00E4/ryhm\u00E4 diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fr.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fr.properties deleted file mode 100644 index fbb1cc44e2..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_fr.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=Supprimer utilisateur/groupe -User/group=Utilisateur/groupe -Anonymous=Anonyme -User/group\ to\ add=Utilisateur/groupe à ajouter -Add=Ajouter diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ja.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ja.properties deleted file mode 100644 index e5c4ae2142..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ja.properties +++ /dev/null @@ -1,29 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2012, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Add=\u8ffd\u52a0 -Anonymous=\u533f\u540d\u30e6\u30fc\u30b6\u30fc -User/group=\u30e6\u30fc\u30b6\u30fc/\u30b0\u30eb\u30fc\u30d7 -User/group\ to\ add=\u8ffd\u52a0\u3059\u308b\u30e6\u30fc\u30b6\u30fc/\u30b0\u30eb\u30fc\u30d7 - -Toggle\ all=\u3059\u3079\u3066\u53cd\u8ee2 -Remove\ user/group=\u30e6\u30fc\u30b6/\u30b0\u30eb\u30fc\u30d7\u3092\u524a\u9664 diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nb_NO.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nb_NO.properties deleted file mode 100644 index 06f66ca6f9..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nb_NO.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Add=Legg til -Anonymous=Anonym -User/group=Bruker/gruppe -User/group\ to\ add=Bruker/gruppe \u00E5 legge til diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nl.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nl.properties deleted file mode 100644 index c9769d698a..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_nl.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:sorokh -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=Verwijder gebruiker/groep -User/group=Gebruiker/groep -Anonymous=Anoniem -User/group\ to\ add=Toe te voegen gebruiker/groep -Add=Voeg toe diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_pt_BR.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_pt_BR.properties deleted file mode 100644 index d68585ad00..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_pt_BR.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Reginaldo L. Russinholi, Cleiber Silva -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -User/group=Usu\u00E1rios/Grupo -Anonymous=An\u00f4nimo -User/group\ to\ add=Usu\u00e1rio/grupo para adicionar -Add=Adicionar diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ru.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ru.properties deleted file mode 100644 index acd0573b2d..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_ru.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Mike Salnikov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F/\u0433\u0440\u0443\u043F\u043F\u0443 -Toggle\ all=\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0441\u0451 -User/group=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c/\u0433\u0440\u0443\u043f\u043f\u0430 -Anonymous=\u0410\u043d\u043e\u043d\u0438\u043c -User/group\ to\ add=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f/\u0433\u0440\u0443\u043f\u043f\u0443 -Add=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_sv_SE.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_sv_SE.properties deleted file mode 100644 index 80304b1fa3..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_sv_SE.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Add=L\u00E4gg till -Anonymous=Anonym -Remove\ user/group=Ta bort anv\u00E4ndare/grupp -Toggle\ all=V\u00E4xla alla -User/group=Anv\u00E4ndare/grupp -User/group\ to\ add=Anv\u00E4ndare/grupp att l\u00E4gga till diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_tr.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_tr.properties deleted file mode 100644 index 2339130169..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_tr.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oguz Dag -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -User/group=Kullan\u0131c\u0131/grup -Anonymous=Bilinmeyen -User/group\ to\ add=Eklenecek grup -Add=Ekle diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_CN.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_CN.properties deleted file mode 100644 index 76b6f20d54..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_CN.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2010, Sun Microsystems, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Remove\ user/group=\u79FB\u9664\u7528\u6237/\u7EC4 -Toggle\ all=\u5C55\u5F00\u5168\u90E8 -User/group=\u7528\u6237/\u7ec4 -Anonymous=\u533f\u540d\u7528\u6237 -User/group\ to\ add=\u6dfb\u52a0\u7528\u6237/\u7ec4 -Add=\u6dfb\u52a0 diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_TW.properties b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_TW.properties deleted file mode 100644 index a39c6fc98f..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config_zh_TW.properties +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-2013, Sun Microsystems, Inc., Chunghwa Telecom Co., Ltd., -# and Pei-Tang Huang -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Toggle\ all=\u53cd\u5411\u9078\u53d6 -Remove\ user/group=\u79fb\u9664\u4f7f\u7528\u8005\u6216\u7fa4\u7d44 - -User/group=\u4f7f\u7528\u8005\u6216\u7fa4\u7d44 -Anonymous=\u533f\u540d\u4f7f\u7528\u8005 -User/group\ to\ add=\u8981\u65b0\u589e\u7684\u4f7f\u7528\u8005\u6216\u7fa4\u7d44 -Add=\u65b0\u589e diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group.jelly b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group.jelly deleted file mode 100644 index 194301ba46..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group.jelly +++ /dev/null @@ -1,13 +0,0 @@ - - -
    - Different security realm has different conventions about group names. - The best way to go about it is to login and see what group names you belong to, - by going to this diagnostics page. - -

    - A special group "authenticated" is also available, which represents all - authenticated (logged in) users. -

    -
    -
    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_ja.jelly b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_ja.jelly deleted file mode 100644 index 39bd6e2abc..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_ja.jelly +++ /dev/null @@ -1,11 +0,0 @@ - - -
    - ユーザー情報の取得先によってグループ名は異なる記法が使われることがあります。 - 最善の方法は、一度ユーザーでログインして、この診断ページに行って実際にJenkinsが使っているグループ名を見ることです。 -

    - 接頭辞である"ROLE_"と大文字であるか小文字であるかを変更するには、Jenkinsのアーカイブに含まれるWEB-INF/security/LDAPBindSecurityRealm.groovyを編集して、 - 再起動します。 -

    -
    -
    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_zh_TW.jelly b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_zh_TW.jelly deleted file mode 100644 index 59d4bbdbc2..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help-user-group_zh_TW.jelly +++ /dev/null @@ -1,11 +0,0 @@ - - -
    - 不同的安全性領域對群組名稱有不一樣的慣例。 - 最好的方法就是登入後,到診斷頁看您所屬的群組名稱。 - -

    - 另外,還可以使用特別群組 "authenticated" 來代表所有驗證通過 (已登入) 的使用者。 -

    -
    -
    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help.html deleted file mode 100644 index c34beb46b3..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help.html +++ /dev/null @@ -1,19 +0,0 @@ -
    - In this scheme, you can configure who can do what by using a big table. - -

    - Each column represents a permission. Hover the mouse over the permission names to get - more information about what they represent. - -

    - Each row represents a user or a group (often called 'role', depending on the security realm.) - This includes a special user 'anonymous', which represents unauthenticated users, as well - as 'authenticated', which represents all authenticated users (IOW, everyone except anonymous users.) - Use the text box below the table to add new users/groups/roles to the table, and click the - [x] icon to remove it from the table. - -

    - Permissions are additive. That is, if an user X is in group A, B, and C, then - the permissions that this user actually has are the union of all permissions given to - X, A, B, C, and anonymous. -

    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_de.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_de.html deleted file mode 100644 index a651b716a8..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_de.html +++ /dev/null @@ -1,20 +0,0 @@ -
    - In dieser Tabelle können Sie angeben, wer zu welchen Aktionen berechtigt ist. -

    - Jede Spalte entspricht einer Berechtigung. Fahren Sie mit der Maus über die - Namen der Berechtigungen, um mehr Informationen darüber zu erhalten, was sie - bedeuten. -

    - Jede Zeile entspricht einem Benutzer oder einer Benutzergruppe (je nach - Benutzerverzeichnis oft auch als "Rolle" bezeichnet). Die Zeilen beinhalten - auch die besonderen Benutzer 'anonymous' bzw. 'authenticated', welche - nichtangemeldete bzw. angemeldete Benutzer repräsentieren, - - Verwenden Sie das untenstehende Textfeld, um neue Benutzer/Gruppen/Rollen zur Tabelle - hinzuzufügen und klicken Sie auf das [x]-Symbol, um sie wieder von der - Tabelle zu entfernen. -

    - Berechtigungen sind additiv. Dies bedeutet, dass ein Benutzer X, der Mitglied - in den Gruppen A, B und C ist, die Vereinigungsmenge aller Berechtigungen - besitzt, die X, A, B, C und dem Benutzer 'anonymous' erteilt wurden. -

    \ No newline at end of file diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_fr.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_fr.html deleted file mode 100644 index 2467997657..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_fr.html +++ /dev/null @@ -1,26 +0,0 @@ -
    - - Cette option vous permet de configurer qui fait quoi dans un grand tableau. - -

    - Chaque colonne représente une autorisation. Faites glisser la souris au - dessus du nom d'une autorisation pour obtenir plus d'information sur - ce qu'elle représente. - -

    - Chaque ligne représente un utilisateur ou un groupe (souvent appelé - 'rôle', selon les royaumes -realms- de sécurité). - On y trouve un utilisateur spécial 'anonymous' qui représente - les utilisateurs non authentifiés, ainsi qu'un utilisateur 'authenticated', - qui représente les utilisateurs authentifiés (c-à-d, tout le monde, à - l'exception des utilisateurs anonymes). - Utilisez le texte sous la table pour ajouter des nouveaux - utilisateurs/groupes/rôles à la table et cliquez sur l'icône - [x] pour les supprimer. - -

    - Les autorisations s'ajoutent les unes aux autres. En clair, si un - utilisateur X est présent dans les groupes A, B et C, alors les - autorisations associées à cet utilisateur sont l'union de toutes les - autorisations accordées à X, A, B, C et anonymous. -

    \ No newline at end of file diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ja.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ja.html deleted file mode 100644 index 2d3401bbef..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ja.html +++ /dev/null @@ -1,19 +0,0 @@ -
    - 大きな表形式で、誰が何をできるのか設定します。 - -

    - 各列はパーミッションを表します。パーミッション名の上にマウスをあわせると、 - そのパーミッションの詳細が表示されます。 - -

    - 各行はユーザーかグループ(セキュリティ・レルムでは、'ロール'とも呼ばれます)を表します。 - この中には、Jenkinsにログインしていない匿名ユーザーをあらわす特別な「anonymous」と、 - また、全てのログイン済みユーザーをあらわす特別な「authenticated」という名前を使うこともできます。 - 表の下にあるテキストボックスを使用して、ユーザー/グループ/ロールを表に追加し、 - [x] のアイコンをクリックすると、表から削除します。 - -

    - パーミッションは追加式です。つまり、ユーザーXがグループA、B、Cに所属しているなら、 - このユーザーが実際に持つパーミッションは、 - ユーザーX、グループA、B、Cおよび匿名ユーザーに与えられた全てのパーミッションの和になります。 -

    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_pt_BR.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_pt_BR.html deleted file mode 100644 index 1b5c049fc2..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_pt_BR.html +++ /dev/null @@ -1,20 +0,0 @@ -
    - - Neste esquema, você pode configurar quem pode fazer o quê usando uma grande tabela. - -

    - Cada coluna representa uma permissão. Passe o mouse sobre os nomes das permissões para - obter mais informação sobre o que elas representam. - -

    - Cada linha representa um usuário ou grupo (frequentemente chamado de 'papel', - dependendo do domínio de segurança.) - Isto inclui um usuário especial chamado 'anonymous', que representa os usuários não autenticados. - Use a caixa de texto abaixo da tabela para adicionar novos usuários/grupos/papéis na tabela, e clique - no ícone [x] para remover da tabela. - -

    - Permissões são cumulativas. Ou seja, se um usuário X está nos grupos A, B, e C, então - as permissões que este usuário na verdade tem é a únião de todas as permissões dadas para - X, A, B, C, e anônimos. -

    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ru.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ru.html deleted file mode 100644 index 36f4e2b496..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_ru.html +++ /dev/null @@ -1,20 +0,0 @@ -
    - - В этом режиме вы можете явно указать допустимые операции, используя матрицу привилегий. - -

    - Каждая колонка представляет собой привилегию. Наведите курсор мыши на имя привелегии - для получения большей информации о её предназначении. - -

    - Каждая строка представляет собой пользователя или группу (обычно называемая "ролью", в - зависимости от используемого модуля безопасности). Список включает также специального - пользователя Аноним, который представляет собой неаутентифицированного пользователя. - Чтобы добавить нового пользователя/группу/роль в таблицу, используйте поле ввода под таблицей. - Чтобы удалить пользователя/группу/роль нажмите кнопку [x] в правой колонке. - -

    - Привилегии аддитивны, то есть если пользователь X состоит в группах A, B и C, тогда - реальные привилегии пользователя - объединение всех привилегий данных конкретно пользователю, - группам A, B и C и анонимному пользователю. -

    \ No newline at end of file diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_tr.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_tr.html deleted file mode 100644 index 44d38936aa..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_tr.html +++ /dev/null @@ -1,19 +0,0 @@ -
    - - Bu şemada, tabloyu kullanarak kimin ne yapabileceğini belirleyebilirsiniz. - -

    - Her kolon bir yetkiyi temsil eder. Mouse ile yetki isimlerinin üzerine - gelerek, daha fazla bilgi alabilirsiniz. - -

    - Her satır bir kullanıcı veya grubu temsil eder (Güvenlik alanına bağlı olarak, "rol" olarak da - adlandırılabilir). Bu satırların içerisinde yetkisiz kullanıcıları temsilen bilinmeyen (anonymous) - kullanıcı da yer almaktadır. Aşağıdaki metin kutusunu kullanarak, tabloya kullanıcı/grup/rol ekleyebilir, - [x] ikonuna tıklayarak bunları silebilirsiniz. - -

    - Yetkilendirme, kullanıcı ve ait olduğu grupların yetkilerinin birleşim kümesi ile hesaplanır. - Yani X kullanıcısı, A, B ve C gruplarına dahilse, yetkileri X, A, B, C ve bilinmeyen kullanıcıya - verilen yetkilerinin birleşim kümesidir. -

    \ No newline at end of file diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_CN.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_CN.html deleted file mode 100644 index 72cdd35847..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_CN.html +++ /dev/null @@ -1,13 +0,0 @@ -
    - 在这种授权模型中,你可以通过一个大的表格来配置什么用户可以做什么事. - -

    - 每一列代表一个权限.把鼠标移动到权限名称上可以查看更详细的权限说明信息. - -

    - 每一行代表一个用户或组(通常称为'角色',取决于安全域.),这其中包含特殊用户'anonymous',其代表未登录用户,同样还有'authenticated',其代表所有已认证的用户(也就是除了匿名用户的所有用户.) - 可以使用表格下方的输入框来添加新的用户/组/角色到表格中,并且可以点击[x]图标将其从表格中删除. - -

    - 权限是追加的,这说明如果一个用户X在A,B,C三个组中,那么X的权限是联合了X,A,B,C和匿名用户的所有权限. -

    diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_TW.html b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_TW.html deleted file mode 100644 index 18b7e9a384..0000000000 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/help_zh_TW.html +++ /dev/null @@ -1,15 +0,0 @@ -
    - 在這種配置下,您可以透過一張大表格,設定每個人可以做的每件事。 - -

    - 每一欄都表示一項權限。將滑鼠游標移到權限名稱上,可以看到權限代表的意義說明。 - -

    - 一行就是一個使用者或群組 (依據安全性領域不同,一般也叫做「角色」)。 - 包括 "anonymous" 特殊使用者,代表沒有通過驗證的人; - 另外也有 "authenticated",代表所有驗證通過的人 (換句話說,就是除了匿名使用者以外的所有人)。 - 透過表格下方的文字方塊可以新增使用者、群組、角色進來,按一下 [x] 圖示可以把它由表格中移掉。 - -

    - 權限會累加。也就是說,如果 X 使用者在 A, B, C 三個群組中,則該使用者實際的權限會是 X, A, B, C 及匿名使用者權限的聯集。 -

    diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe.html new file mode 100644 index 0000000000..0fbfed08ae --- /dev/null +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe.html @@ -0,0 +1,3 @@ +
    + Select this option to remove the “Remember me on this computer” checkbox from the login screen. +
    \ No newline at end of file diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe_de.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe_de.html new file mode 100644 index 0000000000..060ef51cc5 --- /dev/null +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-disableRememberMe_de.html @@ -0,0 +1,4 @@ +
    + Wählen Sie diese Option, um die "Meine Anmeldedaten auf diesem Rechner speichern"-Option + vom Benutzeranmeldedialog zu entfernen. +
    diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy index e670363f5e..6ee7a8196e 100644 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy @@ -28,6 +28,10 @@ l.layout(norefresh:true, permission:app.ADMINISTER, title:my.displayName) { f.serverTcpPort() } + f.entry (title:_("Disable remember me"), field: "disableRememberMe") { + f.checkbox() + } + f.dropdownDescriptorSelector(title:_("Markup Formatter"),descriptors: MarkupFormatterDescriptor.all(), field: 'markupFormatter') f.entry(title:_("Access Control")) { diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_de.properties b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_de.properties index affa1cebc7..ed694c8119 100644 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_de.properties +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_de.properties @@ -23,6 +23,7 @@ LOADING=LADE DATEN Enable\ security=Jenkins absichern TCP\ port\ for\ JNLP\ slave\ agents=TCP-Port f\u00fcr JNLP-Slave +Disable\ remember\ me=Deaktiviere "Anmeldedaten speichern" Markup\ Formatter=Markup-Formatierer Access\ Control=Zugriffskontrolle Security\ Realm=Benutzerverzeichnis (Realm) diff --git a/core/src/main/resources/hudson/security/Messages.properties b/core/src/main/resources/hudson/security/Messages.properties index 2214960963..d88982fe9a 100644 --- a/core/src/main/resources/hudson/security/Messages.properties +++ b/core/src/main/resources/hudson/security/Messages.properties @@ -22,8 +22,6 @@ GlobalSecurityConfiguration.DisplayName=Configure Global Security GlobalSecurityConfiguration.Description=Secure Jenkins; define who is allowed to access/use the system. -GlobalMatrixAuthorizationStrategy.DisplayName=Matrix-based security - HudsonPrivateSecurityRealm.WouldYouLikeToSignUp=This {0} {1} is new to Jenkins. Would you like to sign up? LegacyAuthorizationStrategy.DisplayName=Legacy mode @@ -56,8 +54,6 @@ LegacySecurityRealm.Displayname=Delegate to servlet container UserDetailsServiceProxy.UnableToQuery=Unable to query user information: {0} -ProjectMatrixAuthorizationStrategy.DisplayName=Project-based Matrix Authorization Strategy - PAMSecurityRealm.DisplayName=Unix user/group database PAMSecurityRealm.ReadPermission=Jenkins needs to be able to read /etc/shadow PAMSecurityRealm.BelongToGroup={0} needs to belong to group {1} to read /etc/shadow diff --git a/core/src/main/resources/hudson/security/Messages_da.properties b/core/src/main/resources/hudson/security/Messages_da.properties index 912d05e897..7e84f2ae64 100644 --- a/core/src/main/resources/hudson/security/Messages_da.properties +++ b/core/src/main/resources/hudson/security/Messages_da.properties @@ -36,9 +36,7 @@ HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Brugeradministration HudsonPrivateSecurityRealm.DisplayName=Jenkins''s egen brugerdatabase PAMSecurityRealm.DisplayName=Unix bruger/gruppe database AuthorizationStrategy.DisplayName=Alle kan g\u00f8re alt -ProjectMatrixAuthorizationStrategy.DisplayName=Projektbaseret matriceauthentificering AccessDeniedException2.MissingPermission={0} mangler {1} rettigheden -GlobalMatrixAuthorizationStrategy.DisplayName=Matricebaseret sikkerhed Permission.Permissions.Title=N/A LDAPSecurityRealm.UnableToConnect=Kan ikke oprette forbindelse til {0} : {1} FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Indloggede brugere kan g\u00f8re alt diff --git a/core/src/main/resources/hudson/security/Messages_de.properties b/core/src/main/resources/hudson/security/Messages_de.properties index 52dc616e38..93803b4089 100644 --- a/core/src/main/resources/hudson/security/Messages_de.properties +++ b/core/src/main/resources/hudson/security/Messages_de.properties @@ -22,53 +22,48 @@ GlobalSecurityConfiguration.DisplayName=Globale Sicherheit konfigurieren GlobalSecurityConfiguration.Description=Jenkins absichern und festlegen, wer Zugriff auf das System hat und es benutzen darf. -GlobalMatrixAuthorizationStrategy.DisplayName=Matrix-basierte Sicherheit - LegacyAuthorizationStrategy.DisplayName=Legacy-Autorisierung HudsonPrivateSecurityRealm.DisplayName=Jenkins' eingebautes Benutzerverzeichnis HudsonPrivateSecurityRealm.Details.DisplayName=Passwort HudsonPrivateSecurityRealm.Details.PasswordError=\ - Das angegebene Passwort und seine Wiederholung stimmen nicht überein. \ - Bitte überprüfen Sie Ihre Eingabe. + Das angegebene Passwort und seine Wiederholung stimmen nicht \u00fcberein. \ + Bitte \u00fcberpr\u00fcfen Sie Ihre Eingabe. HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Benutzer verwalten -HudsonPrivateSecurityRealm.ManageUserLinks.Description=Anlegen, Aktualisieren und Löschen von Benutzern, die sich an dieser Jenkins-Installation anmelden dürfen. +HudsonPrivateSecurityRealm.ManageUserLinks.Description=Anlegen, Aktualisieren und L\u00f6schen von Benutzern, die sich an dieser Jenkins-Installation anmelden d\u00fcrfen. -HudsonPrivateSecurityRealm.CreateAccount.TextNotMatchWordInImage=Text stimmt nicht mit dem Wort im Bild überein -HudsonPrivateSecurityRealm.CreateAccount.PasswordNotMatch=Das angegebene Passwort und seine Wiederholung stimmen nicht überein -HudsonPrivateSecurityRealm.CreateAccount.PasswordRequired=Passwort wird benötigt -HudsonPrivateSecurityRealm.CreateAccount.UserNameRequired=Benutzername wird benötigt -HudsonPrivateSecurityRealm.CreateAccount.InvalidEmailAddress=Ungültige E-Mail Adresse +HudsonPrivateSecurityRealm.CreateAccount.TextNotMatchWordInImage=Text stimmt nicht mit dem Wort im Bild \u00fcberein +HudsonPrivateSecurityRealm.CreateAccount.PasswordNotMatch=Das angegebene Passwort und seine Wiederholung stimmen nicht \u00fcberein +HudsonPrivateSecurityRealm.CreateAccount.PasswordRequired=Passwort wird ben\u00f6tigt +HudsonPrivateSecurityRealm.CreateAccount.UserNameRequired=Benutzername wird ben\u00f6tigt +HudsonPrivateSecurityRealm.CreateAccount.InvalidEmailAddress=Ung\u00fcltige E-Mail Adresse HudsonPrivateSecurityRealm.CreateAccount.UserNameAlreadyTaken=Benutzername ist bereits vergeben -FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Angemeldete Benutzer dürfen alle Aktionen ausführen +FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Angemeldete Benutzer d\u00fcrfen alle Aktionen ausf\u00fchren -AuthorizationStrategy.DisplayName=Jeder darf alle Aktionen ausführen +AuthorizationStrategy.DisplayName=Jeder darf alle Aktionen ausf\u00fchren LDAPSecurityRealm.DisplayName=LDAP LDAPSecurityRealm.SyntaxOfServerField=\ Syntax der Server-Angabe ist SERVER, SERVER:PORT oder ldaps://SERVER[:PORT] LDAPSecurityRealm.UnknownHost=Unbekannter Host: {0} LDAPSecurityRealm.UnableToConnect=Keine Verbindung zu {0} : {1} -LDAPSecurityRealm.InvalidPortNumber=Ungültige Port-Nummer +LDAPSecurityRealm.InvalidPortNumber=Ung\u00fcltige Port-Nummer LegacySecurityRealm.Displayname=An Servlet-Container delegieren UserDetailsServiceProxy.UnableToQuery=Benutzerinformationen konnten nicht abgefragt werden: {0} PAMSecurityRealm.DisplayName=Unix Benutzer-/Gruppenverzeichnis -PAMSecurityRealm.ReadPermission=Jenkins benötigt Leserechte für /etc/shadow -PAMSecurityRealm.BelongToGroup={0} muß zu Gruppe {1} gehören, um /etc/shadow lesen zu können. +PAMSecurityRealm.ReadPermission=Jenkins ben\u00f6tigt Leserechte f\u00fcr /etc/shadow +PAMSecurityRealm.BelongToGroup={0} mu\u00df zu Gruppe {1} geh\u00f6ren, um /etc/shadow lesen zu k\u00f6nnen. PAMSecurityRealm.RunAsUserOrBelongToGroupAndChmod=\ - Entweder muß Jenkins als {0} ausgeführt werden, oder {1} muß zu Gruppe {2} gehören und \ - ''chmod g+r /etc/shadow'' muß ausgeführt werden, damit Jenkins /etc/shadow lesen kann. + Entweder mu\u00df Jenkins als {0} ausgef\u00fchrt werden, oder {1} mu\u00df zu Gruppe {2} geh\u00f6ren und \ + ''chmod g+r /etc/shadow'' mu\u00df ausgef\u00fchrt werden, damit Jenkins /etc/shadow lesen kann. PAMSecurityRealm.Success=Erfolgreich PAMSecurityRealm.User=Benutzer ''{0}'' PAMSecurityRealm.CurrentUser=Aktueller Benutzer PAMSecurityRealm.Uid=uid: {0} - -ProjectMatrixAuthorizationStrategy.DisplayName=Projektbasierte Matrix-Zugriffssteuerung - # not in use Permission.Permissions.Title=N/A AccessDeniedException2.MissingPermission={0} fehlt das Recht ''{1}'' diff --git a/core/src/main/resources/hudson/security/Messages_es.properties b/core/src/main/resources/hudson/security/Messages_es.properties index 4b56eb6591..45b42f1543 100644 --- a/core/src/main/resources/hudson/security/Messages_es.properties +++ b/core/src/main/resources/hudson/security/Messages_es.properties @@ -20,37 +20,34 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalSecurityConfiguration.DisplayName=Configuraci\u00F3n global de la seguridad +GlobalSecurityConfiguration.DisplayName=Configuraci\u00f3n global de la seguridad GlobalSecurityConfiguration.Description=Seguridad en Jenkins. \ - Define qui\u00E9n tiene acceso al sistema (autenticaci\u00F3n) y qu\u00E9 puede hacer (autorizaci\u00F3n) -GlobalMatrixAuthorizationStrategy.DisplayName=Configuración de seguridad + Define qui\u00e9n tiene acceso al sistema (autenticaci\u00f3n) y qu\u00e9 puede hacer (autorizaci\u00f3n) LegacyAuthorizationStrategy.DisplayName=Modo ''legacy'' HudsonPrivateSecurityRealm.DisplayName=Usar base de datos de Jenkins -HudsonPrivateSecurityRealm.Details.DisplayName=Contraseña +HudsonPrivateSecurityRealm.Details.DisplayName=Contrase\u00f1a HudsonPrivateSecurityRealm.Details.PasswordError=\ - Las contraseñas no coinciden. -HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Gestión de usuarios + Las contrase\u00f1as no coinciden. +HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Gesti\u00f3n de usuarios HudsonPrivateSecurityRealm.ManageUserLinks.Description=Crear/borrar/editar usuarios que puedan utilizar Jenkins FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Usuarios autenticados tienen privilegios para todo -AuthorizationStrategy.DisplayName=Cualquiera puede hacer cualquier acción +AuthorizationStrategy.DisplayName=Cualquiera puede hacer cualquier acci\u00f3n LegacySecurityRealm.Displayname=Delegar seguridad al contenedor de servlets -UserDetailsServiceProxy.UnableToQuery=Imposible obtener la información del usuario: {0} - -ProjectMatrixAuthorizationStrategy.DisplayName=Estrategia de seguridad para el proyecto +UserDetailsServiceProxy.UnableToQuery=Imposible obtener la informaci\u00f3n del usuario: {0} # not in use Permission.Permissions.Title=N/D AccessDeniedException2.MissingPermission={0} no tiene el permiso {1} -PAMSecurityRealm.DisplayName=Autenticación basada en usuarios y grupos Unix -PAMSecurityRealm.ReadPermission=Jenkins necesita permisos de lectura del fichero /etc/shadowPAMSecurityRealm.DisplayName=Usar autenticación Unix: usuario/grupo +PAMSecurityRealm.DisplayName=Autenticaci\u00f3n basada en usuarios y grupos Unix +PAMSecurityRealm.ReadPermission=Jenkins necesita permisos de lectura del fichero /etc/shadowPAMSecurityRealm.DisplayName=Usar autenticaci\u00f3n Unix: usuario/grupo PAMSecurityRealm.BelongToGroup={0} tiene que pertenecer al grupo {1} para tener acceso de lectura a /etc/shadow PAMSecurityRealm.RunAsUserOrBelongToGroupAndChmod=\ Es necesario que Jenkins se ejecute como "{0}", o bien "{1}" ha de pertenecer al grupo "{2}" y ejecutar "chmod g+r /etc/shadow" para que Jenkins tenga acceso de lectura a /etc/shadow. @@ -63,6 +60,6 @@ LDAPSecurityRealm.DisplayName=LDAP LDAPSecurityRealm.SyntaxOfServerField=La sintaxis para especificar el servidor es: SERVER o SERVER:PORT o ldaps://SERVER[:PORT] LDAPSecurityRealm.UnknownHost=Nombre de host desconocido: {0} LDAPSecurityRealm.UnableToConnect=Incapaz de conectar con {0} : {1} -LDAPSecurityRealm.InvalidPortNumber=El puerto no es válido +LDAPSecurityRealm.InvalidPortNumber=El puerto no es v\u00e1lido -HudsonPrivateSecurityRealm.WouldYouLikeToSignUp=Este {0} {1} es nuevo en Jenkins. ¿Te gustaría crear una nueva cuenta? +HudsonPrivateSecurityRealm.WouldYouLikeToSignUp=Este {0} {1} es nuevo en Jenkins. \u00bfTe gustar\u00eda crear una nueva cuenta? diff --git a/core/src/main/resources/hudson/security/Messages_fr.properties b/core/src/main/resources/hudson/security/Messages_fr.properties index cb358c7ca8..9258c0680a 100644 --- a/core/src/main/resources/hudson/security/Messages_fr.properties +++ b/core/src/main/resources/hudson/security/Messages_fr.properties @@ -20,33 +20,30 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalSecurityConfiguration.DisplayName=Configurer la s\u00E9curit\u00E9 globale -GlobalSecurityConfiguration.Description=S\u00E9curiser Jenkins; d\u00E9finir qui est autoris\u00E9 \u00E0 acc\u00E9der au syst\u00E8me. -GlobalMatrixAuthorizationStrategy.DisplayName=Sécurité basée sur une matrice +GlobalSecurityConfiguration.DisplayName=Configurer la s\u00e9curit\u00e9 globale +GlobalSecurityConfiguration.Description=S\u00e9curiser Jenkins; d\u00e9finir qui est autoris\u00e9 \u00e0 acc\u00e9der au syst\u00e8me. LegacyAuthorizationStrategy.DisplayName=Mode legacy -HudsonPrivateSecurityRealm.DisplayName=Base de données des utilisateurs de Jenkins +HudsonPrivateSecurityRealm.DisplayName=Base de donn\u00e9es des utilisateurs de Jenkins HudsonPrivateSecurityRealm.Details.DisplayName=Mot de passe HudsonPrivateSecurityRealm.Details.PasswordError=\ - Le mot de passe de confirmation n''est pas le même que le premier mot de passe. \ - Merci de vous assurer que les mots de passe sont les mêmes dans les deux cases. -HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Gérer les utilisateurs -HudsonPrivateSecurityRealm.ManageUserLinks.Description=Créer/supprimer/modifier les utilisateurs qui peuvent se logger sur ce serveur Jenkins + Le mot de passe de confirmation n''est pas le m\u00eame que le premier mot de passe. \ + Merci de vous assurer que les mots de passe sont les m\u00eames dans les deux cases. +HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=G\u00e9rer les utilisateurs +HudsonPrivateSecurityRealm.ManageUserLinks.Description=Cr\u00e9er/supprimer/modifier les utilisateurs qui peuvent se logger sur ce serveur Jenkins -FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Les utilisateurs connectés peuvent tout faire +FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Les utilisateurs connect\u00e9s peuvent tout faire -AuthorizationStrategy.DisplayName=Tout le monde a accès à toutes les fonctionnalités +AuthorizationStrategy.DisplayName=Tout le monde a acc\u00e8s \u00e0 toutes les fonctionnalit\u00e9s LDAPSecurityRealm.DisplayName=LDAP -LegacySecurityRealm.Displayname=Déléguer au conteneur de servlets +LegacySecurityRealm.Displayname=D\u00e9l\u00e9guer au conteneur de servlets -UserDetailsServiceProxy.UnableToQuery=Impossible de récupérer les informations utilisateur: {0} +UserDetailsServiceProxy.UnableToQuery=Impossible de r\u00e9cup\u00e9rer les informations utilisateur: {0} -ProjectMatrixAuthorizationStrategy.DisplayName=Stratégie d''authorisation matricielle basée sur les projets - -PAMSecurityRealm.DisplayName=Base de données des utilisateurs & des groupes Unix +PAMSecurityRealm.DisplayName=Base de donn\u00e9es des utilisateurs & des groupes Unix # not in use Permission.Permissions.Title=N/A diff --git a/core/src/main/resources/hudson/security/Messages_ja.properties b/core/src/main/resources/hudson/security/Messages_ja.properties index abe483a0c1..8107aa2dac 100644 --- a/core/src/main/resources/hudson/security/Messages_ja.properties +++ b/core/src/main/resources/hudson/security/Messages_ja.properties @@ -21,7 +21,6 @@ # THE SOFTWARE. GlobalSecurityConfiguration.DisplayName=\u30b0\u30ed\u30fc\u30d0\u30eb\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8a2d\u5b9a GlobalSecurityConfiguration.Description=Jenkins\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8ab0\u304c\u30b7\u30b9\u30c6\u30e0\u306b\u30a2\u30af\u30bb\u30b9\u3001\u4f7f\u7528\u3067\u304d\u308b\u304b\u306a\u3069\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 -GlobalMatrixAuthorizationStrategy.DisplayName=\u884c\u5217\u306b\u3088\u308b\u6a29\u9650\u8a2d\u5b9a HudsonPrivateSecurityRealm.WouldYouLikeToSignUp=\u3053\u306e{0}\u306e{1}\u306f\u3001Jenkins\u306b\u306f\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u30b5\u30a4\u30f3\u30a2\u30c3\u30d7\u3057\u307e\u3059\u304b? LegacyAuthorizationStrategy.DisplayName=\u4e92\u63db\u6027\u30e2\u30fc\u30c9 @@ -53,8 +52,6 @@ LegacySecurityRealm.Displayname=\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30b3\u30f3 UserDetailsServiceProxy.UnableToQuery={0}\u306e\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u691c\u7d22\u3067\u304d\u307e\u305b\u3093\u3002 -ProjectMatrixAuthorizationStrategy.DisplayName=\u884c\u5217\u306b\u3088\u308b\u6a29\u9650\u8a2d\u5b9a(\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5358\u4f4d) - PAMSecurityRealm.DisplayName=Unix \u30e6\u30fc\u30b6\u30fc/\u30b0\u30eb\u30fc\u30d7 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 PAMSecurityRealm.ReadPermission=Jenkins\u304c/etc/shadow\u3092\u8aad\u307f\u8fbc\u307f\u53ef\u80fd\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 PAMSecurityRealm.BelongToGroup=/etc/shadow\u3092\u8aad\u3081\u308b\u3088\u3046\u306b\u3001{0} \u304c\u30b0\u30eb\u30fc\u30d7 {1} \u306b\u5c5e\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 diff --git a/core/src/main/resources/hudson/security/Messages_nl.properties b/core/src/main/resources/hudson/security/Messages_nl.properties index aa1c62b8d0..14a9af3ec4 100644 --- a/core/src/main/resources/hudson/security/Messages_nl.properties +++ b/core/src/main/resources/hudson/security/Messages_nl.properties @@ -20,8 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalMatrixAuthorizationStrategy.DisplayName=Matrix-gebaseerde beveiliging - LegacyAuthorizationStrategy.DisplayName=Legacy-mode HudsonPrivateSecurityRealm.Details.DisplayName=Paswoord diff --git a/core/src/main/resources/hudson/security/Messages_pt_BR.properties b/core/src/main/resources/hudson/security/Messages_pt_BR.properties index 1bda8e932b..272fcb7529 100644 --- a/core/src/main/resources/hudson/security/Messages_pt_BR.properties +++ b/core/src/main/resources/hudson/security/Messages_pt_BR.properties @@ -20,14 +20,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalMatrixAuthorizationStrategy.DisplayName=Seguran\u00E7a baseada em matriz - LegacyAuthorizationStrategy.DisplayName=Modo legado HudsonPrivateSecurityRealm.Details.DisplayName=Senha -HudsonPrivateSecurityRealm.Details.PasswordError=A senha confirmada n\u00E3o \u00E9 igual a senha informada. Por favor assegure-se de digitar a mesma senha duas vezes. +HudsonPrivateSecurityRealm.Details.PasswordError=A senha confirmada n\u00e3o \u00e9 igual a senha informada. Por favor assegure-se de digitar a mesma senha duas vezes. -UserDetailsServiceProxy.UnableToQuery=N\u00E3o foi poss\u00EDvel buscar informa\u00E7\u00F5es do usu\u00E1rio\: {0} +UserDetailsServiceProxy.UnableToQuery=N\u00e3o foi poss\u00edvel buscar informa\u00e7\u00f5es do usu\u00e1rio\: {0} # not in use Permission.Permissions.Title=N/A @@ -36,32 +34,30 @@ PAMSecurityRealm.Success=Sucesso # Unable to connect to {0} : {1} LDAPSecurityRealm.UnableToConnect=Incapaz de conectar {0} : {1} # Logged-in users can do anything -FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Usu\u00E1rios logados n\u00E3o conseguem fazer nada +FullControlOnceLoggedInAuthorizationStrategy.DisplayName=Usu\u00e1rios logados n\u00e3o conseguem fazer nada # Unix user/group database -PAMSecurityRealm.DisplayName=Usu\u00E1rio Uniz / grupo banco da dados +PAMSecurityRealm.DisplayName=Usu\u00e1rio Uniz / grupo banco da dados # User ''{0}'' -PAMSecurityRealm.User=Usu\u00E1rio ''{0}'' +PAMSecurityRealm.User=Usu\u00e1rio ''{0}'' # {0} needs to belong to group {1} to read /etc/shadow PAMSecurityRealm.BelongToGroup= {0} precisa pertencer ao grupo {1} para ler /etc/shadow # Anyone can do anything AuthorizationStrategy.DisplayName=Ninguem consegue fazer nada -# Project-based Matrix Authorization Strategy -#ProjectMatrixAuthorizationStrategy.DisplayName= # Invalid port number -LDAPSecurityRealm.InvalidPortNumber=N\u00FAmero de porta inv\u00E1lido +LDAPSecurityRealm.InvalidPortNumber=N\u00famero de porta inv\u00e1lido # Unknown host: {0} -LDAPSecurityRealm.UnknownHost=Host n\u00E3o localizado {0} +LDAPSecurityRealm.UnknownHost=Host n\u00e3o localizado {0} # uid: {0} PAMSecurityRealm.Uid=uid: {0} # \ # Either Jenkins needs to run as {0} or {1} needs to belong to group {2} and ''chmod g+r /etc/shadow'' needs to be done to enable Jenkins to read /etc/shadow PAMSecurityRealm.RunAsUserOrBelongToGroupAndChmod=Jenkins precisa pertencer ao grupo {2} e ter acesso ''chmod g+r /etc/shadow'' para ler a pasta. # Current User -PAMSecurityRealm.CurrentUser=Usu\u00E1rio atual +PAMSecurityRealm.CurrentUser=Usu\u00e1rio atual # {0} is missing the {1} permission -AccessDeniedException2.MissingPermission= {0} est\u00E1 faltando a permiss\u00E3o {1} +AccessDeniedException2.MissingPermission= {0} est\u00e1 faltando a permiss\u00e3o {1} # Manage Users -HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Gerenciar usu\u00E1rios +HudsonPrivateSecurityRealm.ManageUserLinks.DisplayName=Gerenciar usu\u00e1rios # Delegate to servlet container LegacySecurityRealm.Displayname=Delegar para o container servlet # LDAP @@ -71,6 +67,6 @@ HudsonPrivateSecurityRealm.DisplayName=Base de dados interna do Jenkins # Jenkins needs to be able to read /etc/shadow PAMSecurityRealm.ReadPermission=Jenkins precisa de acesso de leitura em /etc/shadow # Create/delete/modify users that can log in to this Jenkins -HudsonPrivateSecurityRealm.ManageUserLinks.Description=Criar/deletar/modificar usu\u00E1rios que logan no Jenkins +HudsonPrivateSecurityRealm.ManageUserLinks.Description=Criar/deletar/modificar usu\u00e1rios que logan no Jenkins # Syntax of server field is SERVER or SERVER:PORT or ldaps://SERVER[:PORT] LDAPSecurityRealm.SyntaxOfServerField=Sintaxe SERVER or SERVER:PORT or ldaps://SERVER[:PORT] diff --git a/core/src/main/resources/hudson/security/Messages_ru.properties b/core/src/main/resources/hudson/security/Messages_ru.properties index 10e9d57b24..2f9b4ecc14 100644 --- a/core/src/main/resources/hudson/security/Messages_ru.properties +++ b/core/src/main/resources/hudson/security/Messages_ru.properties @@ -20,8 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalMatrixAuthorizationStrategy.DisplayName=\u041c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 - LegacyAuthorizationStrategy.DisplayName="\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439" \u0440\u0435\u0436\u0438\u043c HudsonPrivateSecurityRealm.Details.DisplayName=\u041f\u0430\u0440\u043e\u043b\u044c diff --git a/core/src/main/resources/hudson/security/Messages_tr.properties b/core/src/main/resources/hudson/security/Messages_tr.properties index f212942b83..062ca3e822 100644 --- a/core/src/main/resources/hudson/security/Messages_tr.properties +++ b/core/src/main/resources/hudson/security/Messages_tr.properties @@ -20,8 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalMatrixAuthorizationStrategy.DisplayName=Matris-temelli G\u00fcvenlik - LegacyAuthorizationStrategy.DisplayName=Miras modu HudsonPrivateSecurityRealm.Details.DisplayName=\u015fifre diff --git a/core/src/main/resources/hudson/security/Messages_zh_CN.properties b/core/src/main/resources/hudson/security/Messages_zh_CN.properties index b18472c110..a69de52c6a 100644 --- a/core/src/main/resources/hudson/security/Messages_zh_CN.properties +++ b/core/src/main/resources/hudson/security/Messages_zh_CN.properties @@ -20,8 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GlobalMatrixAuthorizationStrategy.DisplayName=\u5b89\u5168\u77e9\u9635 - LegacyAuthorizationStrategy.DisplayName=\u9057\u7559\u6a21\u5f0f HudsonPrivateSecurityRealm.DisplayName=Jenkins\u4e13\u6709\u7528\u6237\u6570\u636e\u5e93 @@ -46,8 +44,6 @@ LegacySecurityRealm.Displayname=Servlet\u5bb9\u5668\u4ee3\u7406 UserDetailsServiceProxy.UnableToQuery=\u6ca1\u6709\u68c0\u7d22\u5230\u8fd9\u4e2a\u7528\u6237\u4fe1\u606f: {0} -ProjectMatrixAuthorizationStrategy.DisplayName=\u9879\u76ee\u77e9\u9635\u6388\u6743\u7b56\u7565 - PAMSecurityRealm.DisplayName=Unix\u7528\u6237/\u7ec4\u6570\u636e\u5e93 PAMSecurityRealm.ReadPermission=Jenkins\u9700\u8981\u6709/etc/shadow\u8bfb\u7684\u6743\u9650 PAMSecurityRealm.BelongToGroup={0}\u5fc5\u987b\u5c5e\u4e8e{1}\u7ec4\u6765\u8bfb\u53d6/etc/shadow diff --git a/core/src/main/resources/hudson/security/Messages_zh_TW.properties b/core/src/main/resources/hudson/security/Messages_zh_TW.properties index de69665baa..70e9876247 100644 --- a/core/src/main/resources/hudson/security/Messages_zh_TW.properties +++ b/core/src/main/resources/hudson/security/Messages_zh_TW.properties @@ -23,8 +23,6 @@ GlobalSecurityConfiguration.DisplayName=\u8a2d\u5b9a\u5168\u57df\u5b89\u5168\u6027 GlobalSecurityConfiguration.Description=\u4fdd\u8b77 Jenkins\uff0c\u5b9a\u7fa9\u8ab0\u53ef\u4ee5\u5b58\u53d6\u6216\u662f\u4f7f\u7528\u7cfb\u7d71\u3002 -GlobalMatrixAuthorizationStrategy.DisplayName=\u77e9\u9663\u578b\u5b89\u5168\u6027 - HudsonPrivateSecurityRealm.WouldYouLikeToSignUp=Jenkins \u4e0d\u8a8d\u5f97 {0} {1}\u3002\u60a8\u8981\u8a3b\u518a\u55ce? LegacyAuthorizationStrategy.DisplayName=\u820a\u7248\u6a21\u5f0f @@ -57,8 +55,6 @@ LegacySecurityRealm.Displayname=\u59d4\u6d3e\u7d66 Servlet Container UserDetailsServiceProxy.UnableToQuery=\u7121\u6cd5\u67e5\u8a62\u4f7f\u7528\u8005\u8cc7\u8a0a: {0} -ProjectMatrixAuthorizationStrategy.DisplayName=\u5c08\u6848\u578b\u77e9\u9663\u6388\u6b0a\u7b56\u7565 - PAMSecurityRealm.DisplayName=Unix \u4f7f\u7528\u8005\u3001\u7fa4\u7d44\u8cc7\u6599\u5eab PAMSecurityRealm.ReadPermission=Jenkins \u8981\u80fd\u8b80\u53d6 /etc/shadow PAMSecurityRealm.BelongToGroup={0} \u8981\u5728 {1} \u7fa4\u7d44\u88e1\uff0c\u4ee5\u4fbf\u8b80\u53d6 /etc/shadow diff --git a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help.html b/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help.html deleted file mode 100644 index 0d2bdeb80d..0000000000 --- a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help.html +++ /dev/null @@ -1,11 +0,0 @@ -
    - This mode is an extension to "Matrix-based security" that allows additional ACL matrix to be defined - for each project separately (which is done on the job configuration screen.) - -

    - This allows you to say things like "Joe can access project A, B, and C but he can't see D." - See the help of "Matrix-based security" for the concept of matrix-based security in general. - -

    - ACLs are additive, so the access rights granted below will be effective for all the projects. -

    diff --git a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_de.html b/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_de.html deleted file mode 100644 index ced065c3bc..0000000000 --- a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_de.html +++ /dev/null @@ -1,13 +0,0 @@ -
    - Dieser Modus erweitert die "Matrix-basierte Sicherheit" um eine zusätzliche ACL-Rechtematrix, - die für jedes Projekt individuell festgelegt werden kann (in der Konfigurationsmaske des jeweiligen Jobs). - -

    - Dies erlaubt Ihnen eine Rechtevergabe wie z.B. "Joe darf auf Projekt A, B und C zugreifen - er - soll aber Projekt D nicht sehen dürfen". Lesen Sie den Hilfetext bei "Matrix-basierte Sicherheit", - um mehr über das Konzept der matrix-basierten Sicherheit im Allgemeinen zu erfahren. - -

    - ACL-Rechte sind additiv. Dies bedeutet, dass die untenstehend erteilten Rechte für alle - Projekte als erteilt gelten. -

    diff --git a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_ja.html b/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_ja.html deleted file mode 100644 index 771a8be542..0000000000 --- a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_ja.html +++ /dev/null @@ -1,10 +0,0 @@ -
    - "行列による権限設定"の拡張し、プロジェクト毎に行列による権限設定することができます(ジョブの設定画面で行います)。 - -

    - 例えば、"JoeはプロジェクトA、B、Cにアクセスできるが、Dは参照できない"といったことができます。 - 行列による権限設定のコンセプトについては、"行列による権限設定"のヘルプを参照してください。 - -

    - ここで設定した権限は、すべてのプロジェクトの権限に追加されます。 -

    diff --git a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_CN.html b/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_CN.html deleted file mode 100644 index 5cdd5cdd10..0000000000 --- a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_CN.html +++ /dev/null @@ -1,9 +0,0 @@ -
    - 这个授权模型扩展自"安全矩阵",允许把下面的ACL(访问控制列表)矩阵附加到每个项目定义中(在Job配置页面). - -

    - 这允许你宣布类似这样的声明"约翰能够访问A,B和C,但是不能访问D." 查看"安全矩阵"的帮助文档来了解安全矩阵. - -

    - ACL配置是追加的,就是说下面的访问控制会追加到所有的项目配置中。 -

    diff --git a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_TW.html b/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_TW.html deleted file mode 100644 index 59856a2d21..0000000000 --- a/core/src/main/resources/hudson/security/ProjectMatrixAuthorizationStrategy/help_zh_TW.html +++ /dev/null @@ -1,11 +0,0 @@ -
    - 這是「矩陣型安全性」的擴充,可以分別對專案定義額外的存取控制清單 (ACL) 矩陣 - (在作業設定畫面裡調整)。 - -

    - 讓您能做到「Joe 可以看到 A, B, C 專案,但是看不到 D」這種程度的設定。 - 可以看看「矩陣型安全性」的說明,了解矩陣型安全性的基本概念。 - -

    - ACL 會逐一累加,所以下列授與的存取權限會影響到每一個專案。 -

    diff --git a/core/src/main/resources/hudson/security/table.css b/core/src/main/resources/hudson/security/table.css deleted file mode 100644 index 3a83f937e4..0000000000 --- a/core/src/main/resources/hudson/security/table.css +++ /dev/null @@ -1,60 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -.global-matrix-authorization-strategy-table { - border-collapse: collapse; - border-spacing: 0; - border: 1px solid #D3D7CF; -} - -.global-matrix-authorization-strategy-table TH { - padding: 0.2em; -} - -.global-matrix-authorization-strategy-table TD.blank { - vertical-align: middle; - padding: 0.2em; -} - -.global-matrix-authorization-strategy-table .caption-row TH { - font-weight: lighter; - writing-mode: tb-rl; /* works in IE, not FF */ - padding: 0; -} - -.global-matrix-authorization-strategy-table TD { - border: 1px solid #D3D7CF; -} - -.global-matrix-authorization-strategy-table TD.left-most { - text-align: left; - border-left: none; - white-space: nowrap; -} - -.global-matrix-authorization-strategy-table TD.stop { - border-top: 1px solid white; - border-right: 1px solid white; - border-bottom: 1px solid white; - white-space: nowrap; -} diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly b/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly index 40a37835e5..a07b46de64 100644 --- a/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly +++ b/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly @@ -30,17 +30,17 @@ THE SOFTWARE. - ${%Schedule a build with parameters} + - ${%Schedule a build} + + + ${title}
    - \ No newline at end of file + diff --git a/test/src/test/java/hudson/maven/MavenJellyTest.java b/core/src/main/resources/jenkins/model/ArtifactManagerConfiguration/config.groovy similarity index 70% rename from test/src/test/java/hudson/maven/MavenJellyTest.java rename to core/src/main/resources/jenkins/model/ArtifactManagerConfiguration/config.groovy index d501362862..da3ab8a04a 100644 --- a/test/src/test/java/hudson/maven/MavenJellyTest.java +++ b/core/src/main/resources/jenkins/model/ArtifactManagerConfiguration/config.groovy @@ -1,7 +1,7 @@ /* * The MIT License * - * Copyright (c) 2004-2009, Sun Microsystems, Inc. + * Copyright 2013 Jesse Glick. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -21,20 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package hudson.maven; -import hudson.remoting.Which; -import junit.framework.Test; -import junit.framework.TestCase; -import org.jvnet.hudson.test.JellyTestSuiteBuilder; +package jenkins.model.ArtifactManagerConfiguration; -/** - * Runs Jelly checks on maven-plugin. - * - * @author Andrew Bayer - */ -public class MavenJellyTest extends TestCase { - public static Test suite() throws Exception { - return JellyTestSuiteBuilder.build(Which.jarFile(MavenModuleSet.class),true); +f = namespace(lib.FormTagLib); + +if (!jenkins.model.ArtifactManagerFactoryDescriptor.all().isEmpty()) { + f.section(title: _("Artifact Management for Builds")) { + f.block() { + f.repeatableHeteroProperty(field: "artifactManagerFactories", hasHeader: true) + } } } diff --git a/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config_de.properties b/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config_de.properties index a8eed52c7c..71af7664d5 100644 --- a/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config_de.properties +++ b/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config_de.properties @@ -22,4 +22,4 @@ useNamingStrategy = Namenskonventionen f\u00FCr Jobnamen erzwingen namingStrategyTitel = Namensschema -strategy = Strategie \ No newline at end of file +strategy = Schema diff --git a/core/src/main/resources/jenkins/model/Jenkins/login.jelly b/core/src/main/resources/jenkins/model/Jenkins/login.jelly index 77a124025a..a5f68b1178 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/login.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/login.jelly @@ -41,7 +41,7 @@ THE SOFTWARE. ${%Password}: - + diff --git a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.groovy b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.groovy index 0204cd0433..3bfaa168b2 100644 --- a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.groovy +++ b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.groovy @@ -6,6 +6,11 @@ def f=namespace(lib.FormTagLib) f.entry(title:_("namePattern"), field:"namePattern") { f.textbox(value:h.defaulted(instance?.namePattern, descriptor.DEFAULT_PATTERN),class:"fixed-width") } + +f.entry(title:_("description"), field:"description") { + f.textbox() +} + f.entry(title:_("forceExistingJobs"), field:"forceExistingJobs") { f.checkbox(name:"forceExistingJobs") } diff --git a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.properties b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.properties index 9efe256849..76da287c26 100644 --- a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.properties +++ b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config.properties @@ -21,6 +21,7 @@ # THE SOFTWARE. namePattern = Name Pattern +description = Description forceExistingJobs = force existing diff --git a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config_de.properties b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config_de.properties index d847aa718f..d6a30a138a 100644 --- a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config_de.properties +++ b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/config_de.properties @@ -20,5 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -namePattern = Regulärer Ausdruck +namePattern = Regul\u00E4rer Ausdruck +description = Beschreibung forceExistingJobs = auf bestehende Jobs anwenden diff --git a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description.html b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description.html new file mode 100644 index 0000000000..48c0a7eac4 --- /dev/null +++ b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description.html @@ -0,0 +1,4 @@ +

    + Provide a human-readable description to explain naming constraints. + Will be used as error message when job name does not match pattern +

    \ No newline at end of file diff --git a/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description_de.html b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description_de.html new file mode 100644 index 0000000000..1c2fdec73c --- /dev/null +++ b/core/src/main/resources/jenkins/model/ProjectNamingStrategy/PatternProjectNamingStrategy/help-description_de.html @@ -0,0 +1,4 @@ +

    + Geben Sie hier eine Beschreibung des Namensschemas ein. + Sie wird als Fehlermeldung verwendet, wenn der Jobname nicht auf den Regulären Ausdruck passt. +

    diff --git a/core/src/main/resources/lib/form/repeatableHeteroProperty.jelly b/core/src/main/resources/lib/form/repeatableHeteroProperty.jelly index d92c6f7f0e..b1ab6b739b 100644 --- a/core/src/main/resources/lib/form/repeatableHeteroProperty.jelly +++ b/core/src/main/resources/lib/form/repeatableHeteroProperty.jelly @@ -27,14 +27,6 @@ THE SOFTWARE. that assumes the type pointed by the property is data-bound as well. The nested property type must be Describable and it needs to have config.jelly. - - The nested configuration fragment normally needs to have a delete button by adding a fragment like this: - - -
    - -
    -
    ]]> diff --git a/core/src/main/resources/lib/form/repeatableProperty.jelly b/core/src/main/resources/lib/form/repeatableProperty.jelly index 36a2a7a264..955f144348 100644 --- a/core/src/main/resources/lib/form/repeatableProperty.jelly +++ b/core/src/main/resources/lib/form/repeatableProperty.jelly @@ -28,7 +28,7 @@ THE SOFTWARE. Data-bound only version of that assumes the type pointed by the property is data-bound as well. The nested property type must be Describable and it needs to have config.jelly. - The nested configuration fragment normally needs to have a delete button by adding a fragment like this: + Unless that nested config.jelly already adds a delete button (deprecated), you should normally put the following inside this tag:
    @@ -64,6 +64,7 @@ THE SOFTWARE. +
    diff --git a/core/src/main/resources/lib/hudson/artifactList.jelly b/core/src/main/resources/lib/hudson/artifactList.jelly index c38dd581a2..92d6e00418 100644 --- a/core/src/main/resources/lib/hudson/artifactList.jelly +++ b/core/src/main/resources/lib/hudson/artifactList.jelly @@ -63,6 +63,8 @@ THE SOFTWARE. [fingerprint] + + ${%view} @@ -74,6 +76,12 @@ THE SOFTWARE. +
    + + ${%Expand all} + + ${%Collapse all} +
    - - diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ModularizeViewScript/index.groovy b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ModularizeViewScript/index.groovy deleted file mode 100644 index 5ea27a431f..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ModularizeViewScript/index.groovy +++ /dev/null @@ -1,43 +0,0 @@ -package jenkins.plugins.ui_samples.ModularizeViewScript - -import org.kohsuke.stapler.jelly.groovy.JellyBuilder -import jenkins.util.groovy.AbstractGroovyViewModule - -namespace("/lib/samples").sample(title:_("Define View Fragments Elsewhere")) { - - // normally this is how you generate tags, - // but these are actually just a syntax sugar for method calls to the "builder" object (which is set as the delegate of the script for you) - h2("One") - div (style:"border:1px solid blue") { - p("some pointless text") - } - - // so all we need to do is to pass around this delegate object and then you can generate fragments - // from elsewhere - new SomeGenerator(builder).generateSomeFragment() -} - - -// I defined this class here just to make the sample concise. -// this class can be defined anywhere, and typically you'd do this somewhere in your src/main/groovy -class SomeGenerator extends AbstractGroovyViewModule { - SomeGenerator(JellyBuilder builder) { - super(builder) - } - - def generateSomeFragment() { - h2("Two") - div(style:"background-color:gray; padding:2em") { - p("Hello") // once inside a closure, no explicit 'b.' reference is needed. this is just like other Groovy builders - - // calling other methods - generateMoreFragment("Testing generation"); - } - } - - def generateMoreFragment(String msg) { - h2(msg); - f.textarea(); - } -} - diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.groovy b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.groovy deleted file mode 100644 index 8326b55ac3..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.groovy +++ /dev/null @@ -1,48 +0,0 @@ -package jenkins.plugins.ui_samples.NavigationContextMenu; - -import lib.JenkinsTagLib - -def st=namespace("jelly:stapler") - -t=namespace(JenkinsTagLib.class) - -def example(html) { - tr { - td { - text(html) - } - td { - raw(html) - } - } -} - -namespace("/lib/samples").sample(title:_("Navigational context menu integration")) { - raw(_("blurb")) - - h2(_("Defining context menu")) - raw(_("blurb.define")) - - h2(_("Breadcrumb integration")) - raw(_("blurb.breadcrumb")) - - - h2(_("Model hyperlink")) - raw(_("blurb.modelLink")) - table(border:1) { - example "self" - example "up" - } - - raw(_("blurb.modelLink.inside")) - table(border:1) { - example "self" - example "up" - } - - raw(_("blurb.tltr")) - table(border:1) { - example "self" - example "up" - } -} diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.properties b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.properties deleted file mode 100644 index 5af5fd3150..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NavigationContextMenu/index.properties +++ /dev/null @@ -1,27 +0,0 @@ -blurb=

    Jenkins consists of a large and complex graph of domain objects (ModelObject), where each node in the graph is a web page and edges are hyperlinks. \ - To help users navigate quickly on this graph, Jenkins provides a mechanism to attach context menus to model objects, \ - which can be used to hop multiple edges without going through individual hyperlinks. - -blurb.define=

    To define a context menu on ModelObject, implement ModelObjectWithContextMenu. \ - See the example for how to implement this method. - -blurb.breadcrumb=

    Implementing ModelObjectWithContextMenu is sufficient for the core to show the context menu \ - for your model object in the breadcrumb. Hover your mouse over the breadcrumb of this page to see context menu \ - associated with this sample. \ -

    \ - In addition, implementing \ - ModelObjectWithChildren \ - enables you to show children of your model object in the breadcrumb when you click the \u2018>\u2019 icon that separates \ - breadcrumb items. - -blurb.modelLink=

    By adding CSS class "model-link" to the <a> tags pointing to model objects with context menu, \ - you can enable the context menu support to that hyperlink. For example: - -blurb.modelLink.inside=\ -

    Unless the hyperlink appears inline, it is often better to pre-allocate a space for the context menu anchor \ - that appears when the mouse hovers over. To do this, also add the 'inside' CSS element. For example: - - -blurb.tltr=

    By default, context menu appears below the link ,but this is inconvenient when model links line up in a vertical list. \ - Add additional "tl-tr" CSS class (read it as 'top-left of the context menu to top-right of the target anchor) to \ - make context menu appear on the right. \ No newline at end of file diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.groovy b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.groovy deleted file mode 100644 index 8d1e6e8197..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.groovy +++ /dev/null @@ -1,22 +0,0 @@ -package jenkins.plugins.ui_samples.NotificationBar; - -import lib.JenkinsTagLib - -def st=namespace("jelly:stapler") - -t=namespace(JenkinsTagLib.class) - -namespace("/lib/samples").sample(title:_("Notification Bar")) { - raw(_("blurb")) - - raw("To show a notification bar, call notificationBar.show('message')") - button(onclick:"notificationBar.show('This is a notification');", "Show a notification bar") - - raw(_("blurb.hide")) - button(onclick:"notificationBar.hide();", "Hide it now") - - raw(_("blurb.stock")) - button(onclick:"notificationBar.show('it worked!', notificationBar.OK );", "OK") - button(onclick:"notificationBar.show('something went wrong',notificationBar.WARNING);", "WARNING") - button(onclick:"notificationBar.show('something went wrong',notificationBar.ERROR);", "ERROR") -} diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.properties b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.properties deleted file mode 100644 index da9ba766a4..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/NotificationBar/index.properties +++ /dev/null @@ -1,6 +0,0 @@ -blurb=

    Notification bar shows a message that disappears in a few seconds. \ - It is typically used to provide feedback for asynchronous operations. - -blurb.hide=

    A notification bar will auto-hide itself, but you can programmatically hide it via notificationBar.hide() - -blurb.stock=

    For typical notifications, there are several pre-defined option set available as constants that you can use as notificationBar.show(msg,notificationBar.OK) \ No newline at end of file diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressBar/index.groovy b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressBar/index.groovy deleted file mode 100644 index 7118008c41..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressBar/index.groovy +++ /dev/null @@ -1,30 +0,0 @@ -package jenkins.plugins.ui_samples.ProgressBar; - -import lib.JenkinsTagLib - -def st=namespace("jelly:stapler") - -t=namespace(JenkinsTagLib.class) - -namespace("/lib/samples").sample(title:_("Progress Bar")) { - // in this sample, we add extra margin around them - style(".progress-bar {margin:1em;}") - p("This page shows you how to use the progress bar widget") - - p("The 'pos' parameter controls the degree of progress, 0-100") - t.progressBar(pos:30) - t.progressBar(pos:60) - t.progressBar(pos:90) - p("-1 will draw the progress bar in the 'indeterminate' state"); - t.progressBar(pos:-1) - - p("The 'red' parameter turns the progress bar to red. Used to indicate that it's overdue") - t.progressBar(pos:99, red:true) - t.progressBar(pos:-1, red:true) - - p("Tooltip can be added with the 'tooltip' parameter. It can contain arbitrary HTML. Hover your mouse below to see.") - t.progressBar(pos:70, tooltip:"Allows arbitrary html") - - p("Hyperlink can be added with the 'href' pointer. Click the progress bar below") - t.progressBar(pos:70, href:"http://jenkins-ci.org/") -} diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressivelyRendered/index.jelly b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressivelyRendered/index.jelly deleted file mode 100644 index b8a949b284..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/ProgressivelyRendered/index.jelly +++ /dev/null @@ -1,50 +0,0 @@ - - - - -

    - Shows how to do something slow on the server while displaying progress. -

    - -
    - Enter a big number: -
    - - -

    Factors of ${number}:

    - -
      - - - - diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/Root/index.jelly b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/Root/index.jelly deleted file mode 100644 index baa8682cfa..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/Root/index.jelly +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -

      UI Samples

      - -

      Groovy Templates

      - - - - - -
      - -
      -
      -
      -
      - -

      Jelly Templates

      - - - - - -
      - -
      -
      -
      -
      - -
      -
      -
      diff --git a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/SyntaxHighlightedTextArea/index.groovy b/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/SyntaxHighlightedTextArea/index.groovy deleted file mode 100644 index 25f8d94435..0000000000 --- a/ui-samples-plugin/src/main/resources/jenkins/plugins/ui_samples/SyntaxHighlightedTextArea/index.groovy +++ /dev/null @@ -1,33 +0,0 @@ -def st=namespace("jelly:stapler") - -namespace("/lib/samples").sample(title:_("Syntax Highlighted Text Area")) { - p("CodeMirror can be used to turn ordinary text area into syntax-highlighted content-assistable text area") - - // this loads the necessary JavaScripts, if it hasn't loaded already - // the first we load is the mode definition file (mode as in Emacs mode) - // the second is the theme. - // - // for other modes, look for "clike.js" in your IDE and see adjacent folders. - st.adjunct(includes:"org.kohsuke.stapler.codemirror.mode.clike.clike") - st.adjunct(includes:"org.kohsuke.stapler.codemirror.theme.default") - - // TODO: adjunct tag doesn't work because 'wroteHEAD' is not set correctly - // TODO: provide abstraction that hides CSS hookup - - // this text area is what we convert to the super text area - // we use CSS class to hook up the initialization script. In this particular demo, - // the ID attribute can be used, but in more general case (such as when you use this in your Builder, etc., - // a single web page may end up containing multiple instances of such text area, so the CSS class works better. - textarea("class":"my-groovy-textbox", style:"width:100%; height:10em") - - // see CodeMirror web site for more about how to control the newly instantiated text area. - script(""" - Behaviour.specify("TEXTAREA.my-groovy-textbox", "SyntaxHighlightedTextArea", 0, function(e) { - var w = CodeMirror.fromTextArea(e,{ - mode:"text/x-groovy", - lineNumbers: true - }).getWrapperElement(); - w.setAttribute("style","border:1px solid black; margin-top: 1em; margin-bottom: 1em") - }); - """) -} diff --git a/ui-samples-plugin/src/main/resources/lib/samples/sample.jelly b/ui-samples-plugin/src/main/resources/lib/samples/sample.jelly deleted file mode 100644 index b5250eada4..0000000000 --- a/ui-samples-plugin/src/main/resources/lib/samples/sample.jelly +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Page layout for UI samples and variable bindings that emulate the form environment. - - Page title - - - - - - - -

      ${title}

      -

      - -

      -

      Source Files

      - -

      Sample

      - -
      -
      -
      diff --git a/ui-samples-plugin/src/main/resources/lib/samples/taglib b/ui-samples-plugin/src/main/resources/lib/samples/taglib deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/war/pom.xml b/war/pom.xml index 9f760e97eb..843e9155fe 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.531-SNAPSHOT + 1.536-SNAPSHOT ../pom.xml @@ -51,7 +51,7 @@ THE SOFTWARE. org.jenkins-ci executable-war - 1.28 + 1.29 provided @@ -79,11 +79,10 @@ THE SOFTWARE. - ${project.groupId} maven-plugin - ${project.version} + ${maven-plugin.version} provided @@ -104,7 +103,7 @@ THE SOFTWARE. --> org.jenkins-ci winstone - 0.9.10-jenkins-47 + 2.0 test @@ -339,6 +338,12 @@ THE SOFTWARE. 1.5 hpi + + org.jenkins-ci.plugins + matrix-auth + 1.0.2 + hpi + ${project.build.directory}/${project.build.finalName}/WEB-INF/plugins true @@ -447,16 +452,12 @@ THE SOFTWARE. stapler.resourcePath ../core/src/main/resources; - ../ui-samples-plugin/src/main/resources; - ../maven-plugin/src/main/resources hudson.bundled.plugins - ${basedir}/../maven-plugin/target/test-classes/the.hpl, - ${basedir}/../ui-samples-plugin/target/test-classes/the.hpl, ${project.build.directory}/${project.build.finalName}/WEB-INF/plugins/*.hpi diff --git a/war/src/main/webapp/help/project-config/log-rotation_fr.html b/war/src/main/webapp/help/project-config/log-rotation_fr.html index 40ae1e541f..984be68f9d 100644 --- a/war/src/main/webapp/help/project-config/log-rotation_fr.html +++ b/war/src/main/webapp/help/project-config/log-rotation_fr.html @@ -6,7 +6,7 @@ Jenkins propose deux critères :
      1. - Gestion par l'âge. Vous pouvez faire supprimer par Jenkin sun élément + Gestion par l'âge. Vous pouvez faire supprimer par Jenkins un élément s'il a plus d'un certain âge (par exemple, plus de 7 jours).
      2. Gestion par la quantité. Vous pouvez demander à Jenkins de maintenir @@ -18,4 +18,4 @@ 'A conserver de façon permanente', afin de vous assurer que des builds importants ne sont pas supprimés automatiquement. Le dernier build stable et le dernier build exécuté avec succès sont également toujours conservés. -
    \ No newline at end of file + diff --git a/war/src/main/webapp/images/16x16/clock_anime.gif b/war/src/main/webapp/images/16x16/clock_anime.gif new file mode 100644 index 0000000000..e5b9d626d0 Binary files /dev/null and b/war/src/main/webapp/images/16x16/clock_anime.gif differ diff --git a/war/src/main/webapp/images/24x24/clock_anime.gif b/war/src/main/webapp/images/24x24/clock_anime.gif new file mode 100644 index 0000000000..f38764e1ee Binary files /dev/null and b/war/src/main/webapp/images/24x24/clock_anime.gif differ diff --git a/war/src/main/webapp/images/32x32/clock_anime.gif b/war/src/main/webapp/images/32x32/clock_anime.gif new file mode 100644 index 0000000000..ac739551b5 Binary files /dev/null and b/war/src/main/webapp/images/32x32/clock_anime.gif differ diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index b9e2025a15..992e961c21 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -413,7 +413,13 @@ function registerValidator(e) { var depends = this.getAttribute("checkDependsOn"); if (depends==null) {// legacy behaviour where checkUrl is a JavaScript - return eval(url); // need access to 'this', so no 'geval' + try { + return eval(url); // need access to 'this', so no 'geval' + } catch (e) { + if (window.console!=null) console.warn("Legacy checkUrl '" + url + "' is not valid Javascript: "+e); + if (window.YUI!=null) YUI.log("Legacy checkUrl '" + url + "' is not valid Javascript: "+e,"warn"); + return url; // return plain url as fallback + } } else { var q = qs(this).addThis(); if (depends.length>0) @@ -1181,6 +1187,7 @@ var jenkinsRules = { edge.className = "top-sticker-edge"; sticker.insertBefore(edge,sticker.firstChild); + var initialBreadcrumbPosition = DOM.getRegion(shadow); function adjustSticker() { shadow.style.height = sticker.offsetHeight + "px"; @@ -1188,7 +1195,9 @@ var jenkinsRules = { var pos = DOM.getRegion(shadow); sticker.style.position = "fixed"; - sticker.style.top = Math.max(0, pos.top-viewport.top) + "px" + if(pos.top <= initialBreadcrumbPosition.top) { + sticker.style.top = Math.max(0, pos.top-viewport.top) + "px" + } sticker.style.left = Math.max(0,pos.left-viewport.left) + "px" } diff --git a/war/src/main/webapp/scripts/yui/yahoo/yahoo-debug.js b/war/src/main/webapp/scripts/yui/yahoo/yahoo-debug.js index 6e33609f75..e7f786db42 100644 --- a/war/src/main/webapp/scripts/yui/yahoo/yahoo-debug.js +++ b/war/src/main/webapp/scripts/yui/yahoo/yahoo-debug.js @@ -518,9 +518,9 @@ YAHOO.env.parseUA = function(agent) { o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 } } else { // not opera or webkit - m = ua.match(/MSIE\s([^;]*)/); - if (m && m[1]) { - o.ie = numberify(m[1]); + m = ua.match(/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/); + if (m && (m[1] || m[2])) { + o.ie = numberify(m[1] || m[2]); } else { // not opera, webkit, or ie m = ua.match(/Gecko\/([^\s]*)/); if (m) { diff --git a/war/src/main/webapp/scripts/yui/yahoo/yahoo-min.js b/war/src/main/webapp/scripts/yui/yahoo/yahoo-min.js index 4f18140087..2fe823cb45 100644 --- a/war/src/main/webapp/scripts/yui/yahoo/yahoo-min.js +++ b/war/src/main/webapp/scripts/yui/yahoo/yahoo-min.js @@ -4,5 +4,5 @@ Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 2.9.0 */ -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j; +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j; }},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m