Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
30a927fd
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
未验证
提交
30a927fd
编写于
9月 02, 2017
作者:
N
Nicolas De Loof
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rely on java8 default methods to avoid code duplication
Signed-off-by:
N
Nicolas De Loof
<
nicolas.deloof@gmail.com
>
上级
4d60ca6d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
6 addition
and
74 deletion
+6
-74
core/src/main/java/hudson/model/AbstractItem.java
core/src/main/java/hudson/model/AbstractItem.java
+0
-14
core/src/main/java/hudson/model/Computer.java
core/src/main/java/hudson/model/Computer.java
+0
-8
core/src/main/java/hudson/model/MyViewsProperty.java
core/src/main/java/hudson/model/MyViewsProperty.java
+0
-8
core/src/main/java/hudson/model/Node.java
core/src/main/java/hudson/model/Node.java
+0
-8
core/src/main/java/hudson/model/Run.java
core/src/main/java/hudson/model/Run.java
+0
-10
core/src/main/java/hudson/model/User.java
core/src/main/java/hudson/model/User.java
+0
-8
core/src/main/java/hudson/model/View.java
core/src/main/java/hudson/model/View.java
+0
-8
core/src/main/java/hudson/security/AccessControlled.java
core/src/main/java/hudson/security/AccessControlled.java
+6
-2
core/src/main/java/hudson/slaves/Cloud.java
core/src/main/java/hudson/slaves/Cloud.java
+0
-8
未找到文件。
core/src/main/java/hudson/model/AbstractItem.java
浏览文件 @
30a927fd
...
...
@@ -492,20 +492,6 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
return
Jenkins
.
getInstance
().
getAuthorizationStrategy
().
getACL
(
this
);
}
/**
* Short for {@code getACL().checkPermission(p)}
*/
public
void
checkPermission
(
Permission
p
)
{
getACL
().
checkPermission
(
p
);
}
/**
* Short for {@code getACL().hasPermission(p)}
*/
public
boolean
hasPermission
(
Permission
p
)
{
return
getACL
().
hasPermission
(
p
);
}
/**
* Save the settings to a file.
*/
...
...
core/src/main/java/hudson/model/Computer.java
浏览文件 @
30a927fd
...
...
@@ -332,14 +332,6 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
return
Jenkins
.
getInstance
().
getAuthorizationStrategy
().
getACL
(
this
);
}
public
void
checkPermission
(
Permission
permission
)
{
getACL
().
checkPermission
(
permission
);
}
public
boolean
hasPermission
(
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
/**
* If the computer was offline (either temporarily or not),
* this method will return the cause.
...
...
core/src/main/java/hudson/model/MyViewsProperty.java
浏览文件 @
30a927fd
...
...
@@ -185,14 +185,6 @@ public class MyViewsProperty extends UserProperty implements ModifiableViewGroup
return
user
.
getACL
();
}
public
void
checkPermission
(
Permission
permission
)
throws
AccessDeniedException
{
getACL
().
checkPermission
(
permission
);
}
public
boolean
hasPermission
(
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
///// Action methods /////
public
String
getDisplayName
()
{
return
Messages
.
MyViewsProperty_DisplayName
();
...
...
core/src/main/java/hudson/model/Node.java
浏览文件 @
30a927fd
...
...
@@ -509,14 +509,6 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable
return
Jenkins
.
getInstance
().
getAuthorizationStrategy
().
getACL
(
this
);
}
public
final
void
checkPermission
(
Permission
permission
)
{
getACL
().
checkPermission
(
permission
);
}
public
final
boolean
hasPermission
(
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
public
Node
reconfigure
(
final
StaplerRequest
req
,
JSONObject
form
)
throws
FormException
{
if
(
form
==
null
)
return
null
;
...
...
core/src/main/java/hudson/model/Run.java
浏览文件 @
30a927fd
...
...
@@ -1456,16 +1456,6 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
return
new
Api
(
this
);
}
@Override
public
void
checkPermission
(
@Nonnull
Permission
p
)
{
getACL
().
checkPermission
(
p
);
}
@Override
public
boolean
hasPermission
(
@Nonnull
Permission
p
)
{
return
getACL
().
hasPermission
(
p
);
}
@Override
public
ACL
getACL
()
{
// for now, don't maintain ACL per run, and do it at project level
...
...
core/src/main/java/hudson/model/User.java
浏览文件 @
30a927fd
...
...
@@ -894,14 +894,6 @@ public class User extends AbstractModelObject implements AccessControlled, Descr
};
}
public
void
checkPermission
(
Permission
permission
)
{
getACL
().
checkPermission
(
permission
);
}
public
boolean
hasPermission
(
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
/**
* With ADMINISTER permission, can delete users with persisted data but can't delete self.
*/
...
...
core/src/main/java/hudson/model/View.java
浏览文件 @
30a927fd
...
...
@@ -579,14 +579,6 @@ public abstract class View extends AbstractModelObject implements AccessControll
return
Jenkins
.
getInstance
().
getAuthorizationStrategy
().
getACL
(
this
);
}
public
void
checkPermission
(
Permission
p
)
{
getACL
().
checkPermission
(
p
);
}
public
boolean
hasPermission
(
Permission
p
)
{
return
getACL
().
hasPermission
(
p
);
}
/** @deprecated Does not work properly with moved jobs. Use {@link ItemListener#onLocationChanged} instead. */
@Deprecated
public
void
onJobRenamed
(
Item
item
,
String
oldName
,
String
newName
)
{}
...
...
core/src/main/java/hudson/security/AccessControlled.java
浏览文件 @
30a927fd
...
...
@@ -42,11 +42,15 @@ public interface AccessControlled {
/**
* Convenient short-cut for {@code getACL().checkPermission(permission)}
*/
void
checkPermission
(
@Nonnull
Permission
permission
)
throws
AccessDeniedException
;
default
void
checkPermission
(
@Nonnull
Permission
permission
)
throws
AccessDeniedException
{
getACL
().
checkPermission
(
permission
);
}
/**
* Convenient short-cut for {@code getACL().hasPermission(permission)}
*/
boolean
hasPermission
(
@Nonnull
Permission
permission
);
default
boolean
hasPermission
(
@Nonnull
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
}
core/src/main/java/hudson/slaves/Cloud.java
浏览文件 @
30a927fd
...
...
@@ -128,14 +128,6 @@ public abstract class Cloud extends Actionable implements ExtensionPoint, Descri
return
Jenkins
.
getInstance
().
getAuthorizationStrategy
().
getACL
(
this
);
}
public
final
void
checkPermission
(
Permission
permission
)
{
getACL
().
checkPermission
(
permission
);
}
public
final
boolean
hasPermission
(
Permission
permission
)
{
return
getACL
().
hasPermission
(
permission
);
}
/**
* Provisions new {@link Node}s from this cloud.
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录