Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
936fb569
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,发现更多精彩内容 >>
提交
936fb569
编写于
8月 12, 2014
作者:
C
CloudBees DEV@Cloud
浏览文件
操作
浏览文件
下载
差异文件
Merge commit '
ca3b5951
'
上级
6d73a94a
ca3b5951
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
7 deletion
+25
-7
core/src/main/java/hudson/console/AnnotatedLargeText.java
core/src/main/java/hudson/console/AnnotatedLargeText.java
+13
-0
core/src/main/java/hudson/model/AbstractProject.java
core/src/main/java/hudson/model/AbstractProject.java
+3
-3
core/src/main/java/hudson/model/Item.java
core/src/main/java/hudson/model/Item.java
+1
-0
core/src/main/java/hudson/model/Queue.java
core/src/main/java/hudson/model/Queue.java
+6
-1
core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
+1
-2
core/src/main/resources/hudson/model/Messages.properties
core/src/main/resources/hudson/model/Messages.properties
+1
-1
未找到文件。
core/src/main/java/hudson/console/AnnotatedLargeText.java
浏览文件 @
936fb569
...
...
@@ -145,11 +145,24 @@ public class AnnotatedLargeText<T> extends LargeText {
return
super
.
writeLogTo
(
start
,
w
);
}
/**
* Strips annotations using a {@link PlainTextConsoleOutputStream}.
* @inheritDoc
*/
@Override
public
long
writeLogTo
(
long
start
,
OutputStream
out
)
throws
IOException
{
return
super
.
writeLogTo
(
start
,
new
PlainTextConsoleOutputStream
(
out
));
}
/**
* Calls {@link LargeText#writeLogTo(long, OutputStream)} without stripping annotations as {@link #writeLogTo(long, OutputStream)} would.
* @inheritDoc
* @since 1.577
*/
public
long
writeRawLogTo
(
long
start
,
OutputStream
out
)
throws
IOException
{
return
super
.
writeLogTo
(
start
,
out
);
}
public
long
writeHtmlTo
(
long
start
,
Writer
w
)
throws
IOException
{
ConsoleAnnotationOutputStream
caw
=
new
ConsoleAnnotationOutputStream
(
w
,
createAnnotator
(
Stapler
.
getCurrentRequest
()),
context
,
charset
);
...
...
core/src/main/java/hudson/model/AbstractProject.java
浏览文件 @
936fb569
...
...
@@ -1191,11 +1191,11 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
public
void
checkAbortPermission
()
{
checkPermission
(
AbstractProject
.
ABORT
);
checkPermission
(
CANCEL
);
}
public
boolean
hasAbortPermission
()
{
return
hasPermission
(
AbstractProject
.
ABORT
);
return
hasPermission
(
CANCEL
);
}
/**
...
...
@@ -2175,7 +2175,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
AbstractProject
.
class
.
getName
());
/**
*
Permission to abort a build
*
@deprecated Just use {@link #CANCEL}.
*/
public
static
final
Permission
ABORT
=
CANCEL
;
...
...
core/src/main/java/hudson/model/Item.java
浏览文件 @
936fb569
...
...
@@ -226,6 +226,7 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
Permission
READ
=
new
Permission
(
PERMISSIONS
,
"Read"
,
Messages
.
_Item_READ_description
(),
Permission
.
READ
,
PermissionScope
.
ITEM
);
Permission
DISCOVER
=
new
Permission
(
PERMISSIONS
,
"Discover"
,
Messages
.
_AbstractProject_DiscoverPermission_Description
(),
Permission
.
READ
,
PermissionScope
.
ITEM
);
Permission
EXTENDED_READ
=
new
Permission
(
PERMISSIONS
,
"ExtendedRead"
,
Messages
.
_AbstractProject_ExtendedReadPermission_Description
(),
CONFIGURE
,
Boolean
.
getBoolean
(
"hudson.security.ExtendedReadPermission"
),
new
PermissionScope
[]{
PermissionScope
.
ITEM
});
// TODO the following really belong in Job, not Item, but too late to move since the owner.name is encoded in the ID:
Permission
BUILD
=
new
Permission
(
PERMISSIONS
,
"Build"
,
Messages
.
_AbstractProject_BuildPermission_Description
(),
Permission
.
UPDATE
,
PermissionScope
.
ITEM
);
Permission
WORKSPACE
=
new
Permission
(
PERMISSIONS
,
"Workspace"
,
Messages
.
_AbstractProject_WorkspacePermission_Description
(),
Permission
.
READ
,
PermissionScope
.
ITEM
);
Permission
WIPEOUT
=
new
Permission
(
PERMISSIONS
,
"WipeOut"
,
Messages
.
_AbstractProject_WipeOutPermission_Description
(),
null
,
Functions
.
isWipeOutPermissionEnabled
(),
new
PermissionScope
[]{
PermissionScope
.
ITEM
});
...
...
core/src/main/java/hudson/model/Queue.java
浏览文件 @
936fb569
...
...
@@ -1205,6 +1205,7 @@ public class Queue extends ResourceController implements Saveable {
/**
* Works just like {@link #checkAbortPermission()} except it indicates the status by a return value,
* instead of exception.
* Also used by default for {@link hudson.model.Queue.Item#hasCancelPermission}.
*/
boolean
hasAbortPermission
();
...
...
@@ -1478,7 +1479,11 @@ public class Queue extends ResourceController implements Saveable {
}
return
s
.
toString
();
}
/**
* Checks whether a scheduled item may be canceled.
* @return by default, the same as {@link hudson.model.Queue.Task#hasAbortPermission}
*/
public
boolean
hasCancelPermission
()
{
return
task
.
hasAbortPermission
();
}
...
...
core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
浏览文件 @
936fb569
...
...
@@ -25,7 +25,6 @@
package
jenkins.model
;
import
hudson.Util
;
import
static
hudson
.
model
.
AbstractProject
.
ABORT
;
import
hudson.model.Action
;
import
hudson.model.BuildableItem
;
import
hudson.model.Cause
;
...
...
@@ -206,7 +205,7 @@ public abstract class ParameterizedJobMixIn<JobT extends Job<JobT, RunT> & Param
*/
@RequirePOST
public
final
void
doCancelQueue
(
StaplerRequest
req
,
StaplerResponse
rsp
)
throws
IOException
,
ServletException
{
asJob
().
checkPermission
(
ABORT
);
asJob
().
checkPermission
(
Item
.
CANCEL
);
Jenkins
.
getInstance
().
getQueue
().
cancel
(
asJob
());
rsp
.
forwardToPreviousPage
(
req
);
}
...
...
core/src/main/resources/hudson/model/Messages.properties
浏览文件 @
936fb569
...
...
@@ -70,7 +70,7 @@ AbstractProject.DiscoverPermission.Description=\
AbstractProject.WipeOutPermission.Description
=
\
This permission grants the ability to wipe out the contents of a workspace.
AbstractProject.CancelPermission.Description
=
\
This permission grants the ability to cancel a build.
This permission grants the ability to cancel a
scheduled, or abort a running,
build.
AbstractProject.AssignedLabelString.InvalidBooleanExpression
=
\
Invalid boolean expression: {0}
AbstractProject.AssignedLabelString.NoMatch
=
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录