Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roginluo
Jenkins
提交
07720988
J
Jenkins
项目概览
roginluo
/
Jenkins
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
07720988
编写于
10月 02, 2013
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refer to permissions now defined in Item by that name, not via AbstractProject or Job.
上级
6c886e7b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
11 deletion
+9
-11
core/src/main/java/hudson/model/AbstractProject.java
core/src/main/java/hudson/model/AbstractProject.java
+1
-1
core/src/main/java/hudson/model/BuildAuthorizationToken.java
core/src/main/java/hudson/model/BuildAuthorizationToken.java
+1
-1
core/src/main/java/hudson/model/ItemGroupMixIn.java
core/src/main/java/hudson/model/ItemGroupMixIn.java
+4
-4
core/src/main/java/hudson/model/MyView.java
core/src/main/java/hudson/model/MyView.java
+2
-2
core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
...ain/java/hudson/security/AuthorizationMatrixProperty.java
+1
-3
未找到文件。
core/src/main/java/hudson/model/AbstractProject.java
浏览文件 @
07720988
...
...
@@ -2053,7 +2053,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,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
...
...
core/src/main/java/hudson/model/BuildAuthorizationToken.java
浏览文件 @
07720988
...
...
@@ -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
;
...
...
core/src/main/java/hudson/model/ItemGroupMixIn.java
浏览文件 @
07720988
...
...
@@ -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
extends
TopLevelItem
>
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
)
...
...
core/src/main/java/hudson/model/MyView.java
浏览文件 @
07720988
...
...
@@ -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
<
TopLevelItem
>
getItems
()
{
List
<
TopLevelItem
>
items
=
new
ArrayList
<
TopLevelItem
>();
for
(
TopLevelItem
item
:
getOwnerItemGroup
().
getItems
())
{
if
(
item
.
hasPermission
(
Job
.
CONFIGURE
))
{
if
(
item
.
hasPermission
(
Item
.
CONFIGURE
))
{
items
.
add
(
item
);
}
}
...
...
core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
浏览文件 @
07720988
...
...
@@ -24,13 +24,11 @@
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
;
...
...
@@ -184,7 +182,7 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
}
public
FormValidation
doCheckName
(
@AncestorInPath
Job
project
,
@QueryParameter
String
value
)
throws
IOException
,
ServletException
{
return
GlobalMatrixAuthorizationStrategy
.
DESCRIPTOR
.
doCheckName_
(
value
,
project
,
AbstractProject
.
CONFIGURE
);
return
GlobalMatrixAuthorizationStrategy
.
DESCRIPTOR
.
doCheckName_
(
value
,
project
,
Item
.
CONFIGURE
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录