diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 87edf95188e1cf69b884fe09a2ac970eaaf6fa6f..4b08a8d92b96d25ebf991daa2e1682ff61162328 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -2,7 +2,7 @@ * The MIT License * * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, - * Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder + * Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Romain Seguy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -1266,4 +1266,20 @@ public class Functions { public static boolean getIsUnitTest() { return Main.isUnitTest; } + + /** + * Returns {@code true} if the {@link Run#ARTIFACTS} permission is enabled, + * {@code false} otherwise. + * + *

When the {@link Run#ARTIFACTS} permission is not turned on using the + * {@code hudson.security.ArtifactsPermission}, this permission must not be + * considered to be set to {@code false} for every user. It must rather be + * like if the permission doesn't exist at all (which means that every user + * has to have an access to the artifacts but the permission can't be + * configured in the security screen). Got it?

+ */ + public static boolean isArtifactsPermissionEnabled() { + return Boolean.getBoolean("hudson.security.ArtifactsPermission"); + } + } diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index c92b7880da4229face0e1126838ece38e9317e51..e90404c374aed4f27b6383d815b955342d9d2755 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -2,7 +2,7 @@ * The MIT License * * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, - * Daniel Dyer, Red Hat, Inc., Tom Huybrechts + * Daniel Dyer, Red Hat, Inc., Tom Huybrechts, Romain Seguy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,6 +24,7 @@ */ package hudson.model; +import hudson.Functions; import hudson.AbortException; import hudson.BulkChange; import hudson.EnvVars; @@ -1530,6 +1531,9 @@ public abstract class Run ,RunT extends Run,RunT extends Run { public String getEntryTitle(Run entry) { diff --git a/core/src/main/resources/hudson/model/AbstractBuild/index.jelly b/core/src/main/resources/hudson/model/AbstractBuild/index.jelly index fe23d62c2bf157e91b811558422df367ab96bc4b..c66658b7ad67988f67d725624a9387d7ffb9932b 100644 --- a/core/src/main/resources/hudson/model/AbstractBuild/index.jelly +++ b/core/src/main/resources/hudson/model/AbstractBuild/index.jelly @@ -1,7 +1,8 @@ - - - - - ${%Build Artifacts} - - - - + + + + + + ${%Build Artifacts} + + + + + \ No newline at end of file diff --git a/core/src/main/resources/lib/hudson/artifactList.jelly b/core/src/main/resources/lib/hudson/artifactList.jelly index 258227448b779e5ac1a732e91ed2a346429af71e..9b23cfa241a89e56fad216d3ca5eaf6086e048b3 100644 --- a/core/src/main/resources/lib/hudson/artifactList.jelly +++ b/core/src/main/resources/lib/hudson/artifactList.jelly @@ -1,7 +1,7 @@ - - - - - - - - -
- -
- - - + + + + + + + + +
+ +
+ + + + diff --git a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index.jelly b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index.jelly index 690b6c181f65f5f9861fb065ec585411e774673b..c7b04562e2cc6b6b12cb834aa2566f8c40cf0578 100644 --- a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index.jelly +++ b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index.jelly @@ -1,7 +1,8 @@