Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
5b007aab
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b007aab
编写于
7月 23, 2011
作者:
R
Ryan Campbell
提交者:
Nicolas De Loof
7月 26, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added new hudson.model.Computer.CREATE permission to limit who can create new slaves.
上级
bf08281f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
6 deletion
+12
-6
changelog.html
changelog.html
+2
-0
core/src/main/java/hudson/model/Computer.java
core/src/main/java/hudson/model/Computer.java
+1
-0
core/src/main/java/hudson/model/ComputerSet.java
core/src/main/java/hudson/model/ComputerSet.java
+3
-3
core/src/main/resources/hudson/model/ComputerSet/_new.jelly
core/src/main/resources/hudson/model/ComputerSet/_new.jelly
+1
-1
core/src/main/resources/hudson/model/ComputerSet/new.jelly
core/src/main/resources/hudson/model/ComputerSet/new.jelly
+2
-1
core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
...c/main/resources/hudson/model/ComputerSet/sidepanel.jelly
+2
-1
core/src/main/resources/hudson/model/Messages.properties
core/src/main/resources/hudson/model/Messages.properties
+1
-0
未找到文件。
changelog.html
浏览文件 @
5b007aab
...
...
@@ -108,6 +108,8 @@ Upcoming changes</a>
<li
class=
bug
>
Fixed an occasional NPE when running Maven jobs
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-9822"
>
issue 9822
</a>
)
<li
class=
rfe
>
Added a new hudson.model.Computer.CREATE permission to limit who can create new slaves.
</ul>
<h3><a
name=
v1.421
>
What's new in 1.421
</a>
(2011/07/17)
</h3>
<ul
class=
image
>
...
...
core/src/main/java/hudson/model/Computer.java
浏览文件 @
5b007aab
...
...
@@ -1146,6 +1146,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
*/
public
static
final
Permission
CONFIGURE
=
new
Permission
(
PERMISSIONS
,
"Configure"
,
Messages
.
_Computer_ConfigurePermission_Description
(),
Permission
.
CONFIGURE
,
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
);
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
Computer
.
class
.
getName
());
}
core/src/main/java/hudson/model/ComputerSet.java
浏览文件 @
5b007aab
...
...
@@ -210,7 +210,7 @@ public final class ComputerSet extends AbstractModelObject {
@QueryParameter
String
name
,
@QueryParameter
String
mode
,
@QueryParameter
String
from
)
throws
IOException
,
ServletException
{
final
Jenkins
app
=
Jenkins
.
getInstance
();
app
.
checkPermission
(
Jenkins
.
ADMINISTER
);
// TODO: new permission?
app
.
checkPermission
(
Computer
.
CREATE
);
if
(
mode
!=
null
&&
mode
.
equals
(
"copy"
))
{
name
=
checkName
(
name
);
...
...
@@ -254,7 +254,7 @@ public final class ComputerSet extends AbstractModelObject {
@QueryParameter
String
name
,
@QueryParameter
String
type
)
throws
IOException
,
ServletException
,
FormException
{
final
Jenkins
app
=
Jenkins
.
getInstance
();
app
.
checkPermission
(
Jenkins
.
ADMINISTER
);
// TODO: new permission?
app
.
checkPermission
(
Computer
.
CREATE
);
checkName
(
name
);
Node
result
=
NodeDescriptor
.
all
().
find
(
type
).
newInstance
(
req
,
req
.
getSubmittedForm
());
...
...
@@ -286,7 +286,7 @@ public final class ComputerSet extends AbstractModelObject {
* Makes sure that the given name is good as a slave name.
*/
public
FormValidation
doCheckName
(
@QueryParameter
String
value
)
throws
IOException
,
ServletException
{
Jenkins
.
getInstance
().
checkPermission
(
Jenkins
.
ADMINISTER
);
Jenkins
.
getInstance
().
checkPermission
(
Computer
.
CREATE
);
if
(
Util
.
fixEmpty
(
value
)==
null
)
return
FormValidation
.
ok
();
...
...
core/src/main/resources/hudson/model/ComputerSet/_new.jelly
浏览文件 @
5b007aab
...
...
@@ -28,7 +28,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">
<l:layout norefresh="true" permission="${
app.ADMINISTER
}">
<l:layout norefresh="true" permission="${
it.CREATE
}">
<st:include page="sidepanel.jelly"/>
<l:main-panel>
<f:form method="post" action="doCreateItem">
...
...
core/src/main/resources/hudson/model/ComputerSet/new.jelly
浏览文件 @
5b007aab
...
...
@@ -31,7 +31,8 @@ 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:s="/lib/form">
<l:layout norefresh="true" permission="${app.ADMINISTER}">
<j:getStatic var="createPermission" className="hudson.model.Computer" field="CREATE"/>
<l:layout norefresh="true" permission="${createPermission}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<j:invokeStatic var="slaves" className="hudson.slaves.NodeDescriptor" method="allInstantiable" />
...
...
core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
浏览文件 @
5b007aab
...
...
@@ -29,10 +29,11 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
<l:header />
<l:side-panel>
<j:getStatic var="createPermission" className="hudson.model.Computer" field="CREATE"/>
<l:tasks>
<l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="images/24x24/setting.png" href="${rootURL}/manage" title="${%Manage Jenkins}" permission="${app.ADMINISTER}" />
<l:task icon="images/24x24/new-computer.png" href="new" title="${%New Node}" permission="${
app.ADMINISTER
}" />
<l:task icon="images/24x24/new-computer.png" href="new" title="${%New Node}" permission="${
createPermission
}" />
<l:task icon="images/24x24/setting.png" href="configure" title="${%Configure}" permission="${app.ADMINISTER}" />
</l:tasks>
<t:queue items="${app.queue.items}" />
...
...
core/src/main/resources/hudson/model/Messages.properties
浏览文件 @
5b007aab
...
...
@@ -91,6 +91,7 @@ Computer.NoSuchSlaveExists=No such slave "{0}" exists. Did you mean "{1}"?
Computer.Permissions.Title
=
Slave
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.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录