提交 0ebd8a6c 编写于 作者: J Jesse Glick

Revert "[JENKINS-16502] Permission to see an executor/slave"

This reverts commit 647695e2.
上级 42d2f3da
......@@ -71,9 +71,6 @@ Upcoming changes</a>
<li class=rfe>
Offer alternate error message for pattern-based project naming strategy.
(<a href="https://github.com/jenkinsci/jenkins/pull/914">pull request 914</a>)
<li class=rfe>
Add support for hiding build slaves from users.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16502">issue 16502</a>)
</ul>
</div><!--=END=-->
<h3><a name=v1.532>What's new in 1.532</a> (2013/09/23)</h3>
......
......@@ -1373,10 +1373,6 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
public static final Permission DISCONNECT = new Permission(PERMISSIONS,"Disconnect", Messages._Computer_DisconnectPermission_Description(), Jenkins.ADMINISTER, PermissionScope.COMPUTER);
public static final Permission CONNECT = new Permission(PERMISSIONS,"Connect", Messages._Computer_ConnectPermission_Description(), DISCONNECT, PermissionScope.COMPUTER);
public static final Permission BUILD = new Permission(PERMISSIONS, "Build", Messages._Computer_BuildPermission_Description(), Permission.WRITE, PermissionScope.COMPUTER);
/**
* @since 1.533
*/
public static final Permission VIEW = new Permission(PERMISSIONS, "View", Messages._Computer_ViewPermission_Description(), Permission.READ, PermissionScope.COMPUTER);
private static final Logger LOGGER = Logger.getLogger(Computer.class.getName());
}
......@@ -1533,12 +1533,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro
* Gets the read-only list of all {@link Computer}s.
*/
public Computer[] getComputers() {
Collection<Computer> computers = new ArrayList<Computer>(this.computers.size());
for (Computer c: this.computers.values()) {
if (c.hasPermission(Computer.VIEW))
computers.add(c);
}
Computer[] r = computers.toArray(new Computer[computers.size()]);
Computer[] r = computers.values().toArray(new Computer[computers.size()]);
Arrays.sort(r,new Comparator<Computer>() {
final Collator collator = Collator.getInstance();
public int compare(Computer lhs, Computer rhs) {
......@@ -1557,7 +1552,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro
for (Computer c : computers.values()) {
if(c.getName().equals(name))
return c.hasPermission(Computer.VIEW) ? c : null;
return c;
}
return null;
}
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${it.displayName}" permission="${it.VIEW}">
<l:layout title="${it.displayName}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<h1>
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout permission="${it.DELETE}">
<l:layout>
<st:include page="sidepanel.jelly" />
<l:main-panel>
<form method="post" action="doDelete">
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${it.displayName}" permission="${it.VIEW}">
<l:layout title="${it.displayName}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${it.displayName} Load Statistics" permission="${it.VIEW}">
<l:layout title="${it.displayName} Load Statistics">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<st:include page="main.jelly" from="${it.loadStatistics}" />
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${%title(it.displayName)}" norefresh="true" permission="${it.VIEW}">
<l:layout title="${%title(it.displayName)}" norefresh="true">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<l:hasPermission permission="${it.DISCONNECT}">
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${%title(it.displayName)}" norefresh="true" permission="${it.VIEW}">
<l:layout title="${%title(it.displayName)}" norefresh="true">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<l:hasPermission permission="${it.DISCONNECT}">
......
......@@ -109,7 +109,6 @@ Computer.CreatePermission.Description=This permission allows users to create sla
Computer.ConnectPermission.Description=This permission allows users to connect slaves or mark slaves as online.
Computer.DisconnectPermission.Description=This permission allows users to disconnect slaves or mark slaves as temporarily offline.
Computer.BuildPermission.Description=This permission allows users to run jobs as them on slaves.
Computer.ViewPermission.Description=This permission allows users to see the slaves.
Computer.BadChannel=Slave node offline or not a remote channel (such as master node).
ComputerSet.NoSuchSlave=No such slave: {0}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册