diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 6e893e2979..39a58bbcb2 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -189,10 +189,6 @@ public class Functions { return Node.Mode.values(); } - public static Node.JNLPSecurityMode[] getJNLPSecurityModes() { - return Node.JNLPSecurityMode.values(); - } - public static String getProjectListString(List projects) { return Items.toNameList(projects); } diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 579bff42fd..1d7ea52b05 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -2,7 +2,6 @@ package hudson.model; import hudson.EnvVars; import hudson.Functions; -import hudson.Util; import hudson.remoting.Callable; import hudson.remoting.VirtualChannel; import hudson.util.DaemonThreadFactory; @@ -19,10 +18,10 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; -import java.util.logging.LogRecord; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.logging.LogRecord; /** * Represents a set of {@link Executor}s on the same computer. @@ -118,30 +117,6 @@ public abstract class Computer implements ModelObject { return false; } - /** - * Returns true if this computer is needs to be launched via JNLP. That is if the Launch slave agent link should be - * visible. - * @return true if and only if the JNLP link should be shown. - */ - public boolean isJnlpAgentLaunchVisible() { - return isJnlpAgent() && isOffline() && !isTemporarilyOffline(); - } - - /** - * Returns true if the JNLP link should be restricted to authenticated in users. - * @return true if and only if the JNLP link should be restricted to authenticated users. - */ - public boolean isJnlpAgentLaunchAdminOnly() { - return true; - } - - /** - * Returns true if the JNLP link should be visible from the main page. - * @return true if and only if the JNLP link should be availible from the main page. - */ - public boolean isJnlpAgentLaunchPublic() { - return false; - } /** * Returns true if this node is marked temporarily offline by the user. * diff --git a/core/src/main/java/hudson/model/Node.java b/core/src/main/java/hudson/model/Node.java index efc04eda12..3fb1083c29 100644 --- a/core/src/main/java/hudson/model/Node.java +++ b/core/src/main/java/hudson/model/Node.java @@ -96,52 +96,4 @@ public interface Node { ConvertUtils.register(new EnumConverter(),Mode.class); } } - - enum JNLPSecurityMode { - NORMAL("Launch only from Computer detail. Require Login if security enabled.", true, false, false), - SECURE_PUBLIC("Launch from front page. Require Login if security enabled.", true, false, false), - BYPASS("Launch only from Computer detail. Login never required. (!See WARNING in help --> !)", false, false, false)/*, - // stephenconnolly: backing these next changes until a better model is available - PUBLIC("Launch from front page. Login never required.", false, true, false), - - // stephenconnolly: holding off on these next changes until they are closer to ready - DYNAMIC("Dynamic secure slave (experimental)", true, true, true), - DYNAMIC("Dynamic public slave (experimental)", false, true, true)*/; - - private final String description; - private final boolean enforceSecurity; - private final boolean publicLaunch; - private final boolean dynamicPool; - - public String getDescription() { - return description; - } - - public String getName() { - return name(); - } - - public boolean isEnforceSecurity() { - return enforceSecurity; - } - - public boolean isPublicLaunch() { - return publicLaunch; - } - - public boolean isDynamicPool() { - return dynamicPool; - } - - JNLPSecurityMode(String description, boolean enforceSecurity, boolean publicLaunch, boolean dynammicPool) { - this.description = description; - this.enforceSecurity = enforceSecurity; - this.publicLaunch = publicLaunch; - this.dynamicPool = dynammicPool; - } - - static { - ConvertUtils.register(new EnumConverter(), JNLPSecurityMode.class); - } - } } diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index 942633a602..e91c94fd67 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -74,11 +74,6 @@ public final class Slave implements Node, Serializable { */ private Mode mode; - /** - * JNLP Security mode - */ - private JNLPSecurityMode jnlpSecurity; - /** * Command line to launch the agent, like * "ssh myslave java -jar /path/to/hudson-remoting.jar" @@ -102,14 +97,13 @@ public final class Slave implements Node, Serializable { * @stapler-constructor */ public Slave(String name, String description, String command, String remoteFS, int numExecutors, Mode mode, - String label, JNLPSecurityMode jnlpSecurity) throws FormException { + String label) throws FormException { this.name = name; this.description = description; this.numExecutors = numExecutors; this.mode = mode; this.agentCommand = command; this.remoteFS = remoteFS; - this.jnlpSecurity = jnlpSecurity; this.label = Util.fixNull(label).trim(); getAssignedLabels(); // compute labels now @@ -156,10 +150,6 @@ public final class Slave implements Node, Serializable { return mode; } - public JNLPSecurityMode getJnlpSecurity() { - return jnlpSecurity; - } - public String getLabelString() { return Util.fixNull(label).trim(); } @@ -324,44 +314,6 @@ public final class Slave implements Node, Serializable { return getNode().getCommand().length()==0; } - - /** - * Returns true if this computer is needs to be launched via JNLP. That is if the Launch slave agent link should be - * visible. - * - * @return true if and only if the JNLP link should be shown. - */ - @Override - public boolean isJnlpAgentLaunchVisible() { - if (getNode().getJnlpSecurity().isDynamicPool()) { - return isJnlpAgent(); - } - return super.isJnlpAgentLaunchVisible(); - } - - /** - * Returns true if the JNLP link should be restricted to authenticated in users. - * - * @return true if and only if the JNLP link should be restricted to authenticated users. - */ - @Override - public boolean isJnlpAgentLaunchAdminOnly() { - return getNode().getJnlpSecurity().isEnforceSecurity(); - } - - /** - * Returns true if the JNLP link should be visible from the main page. - * - * @return true if and only if the JNLP link should be availible from the main page. - */ - @Override - public boolean isJnlpAgentLaunchPublic() { - if (getNode().getJnlpSecurity().isPublicLaunch()) { - return isJnlpAgent(); - } - return super.isJnlpAgentLaunchPublic(); //To change body of overridden methods use File | Settings | File Templates. - } - /** * Launches a remote agent. */ diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 70c15f23d4..0cb817fe91 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -22,8 +22,8 @@ - - + +

launch agent @@ -33,7 +33,7 @@

(Click the above link from this slave computer to launch the slave agent via JNLP)

-
+

diff --git a/core/src/main/resources/hudson/model/Hudson/configure.jelly b/core/src/main/resources/hudson/model/Hudson/configure.jelly index 8de914d96e..ac0c60e8af 100644 --- a/core/src/main/resources/hudson/model/Hudson/configure.jelly +++ b/core/src/main/resources/hudson/model/Hudson/configure.jelly @@ -88,15 +88,7 @@ - - - - - +