Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c1de46db
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c1de46db
编写于
9月 10, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix project pages for authorized user
上级
4e7b47dd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
7 deletion
+12
-7
app/assets/stylesheets/ci/application.scss
app/assets/stylesheets/ci/application.scss
+4
-0
app/controllers/ci/application_controller.rb
app/controllers/ci/application_controller.rb
+2
-3
app/controllers/ci/runners_controller.rb
app/controllers/ci/runners_controller.rb
+3
-1
app/views/ci/builds/show.html.haml
app/views/ci/builds/show.html.haml
+2
-2
app/views/layouts/ci/project.html.haml
app/views/layouts/ci/project.html.haml
+1
-1
未找到文件。
app/assets/stylesheets/ci/application.scss
浏览文件 @
c1de46db
...
...
@@ -52,4 +52,8 @@ $nprogress-color: #9BC;
body
{
padding-top
:
0
!
important
;
a
{
color
:
#3084bb
;
}
}
app/controllers/ci/application_controller.rb
浏览文件 @
c1de46db
...
...
@@ -8,7 +8,6 @@ module Ci
rescue_from
Ci
::
Network
::
UnauthorizedError
,
with: :invalid_token
before_filter
:default_headers
#before_filter :check_config
helper_method
:gl_project
protect_from_forgery
...
...
@@ -38,7 +37,7 @@ module Ci
end
def
authorize_manage_builds!
unless
can?
(
current_user
,
:
manage_builds
,
gl_project
)
unless
can?
(
current_user
,
:
admin_project
,
gl_project
)
return
page_404
end
end
...
...
@@ -48,7 +47,7 @@ module Ci
end
def
authorize_manage_project!
unless
can?
(
current_user
,
:
manage
_project
,
gl_project
)
unless
can?
(
current_user
,
:
admin
_project
,
gl_project
)
return
page_404
end
end
...
...
app/controllers/ci/runners_controller.rb
浏览文件 @
c1de46db
...
...
@@ -10,7 +10,9 @@ module Ci
def
index
@runners
=
@project
.
runners
.
order
(
'id DESC'
)
@specific_runners
=
current_user
.
authorized_runners
.
@specific_runners
=
Ci
::
Runner
.
specific
.
includes
(
:runner_projects
).
where
(
Ci
::
RunnerProject
.
table_name
=>
{
project_id:
current_user
.
authorized_projects
}
).
where
.
not
(
id:
@runners
).
order
(
"
#{
Ci
::
Runner
.
table_name
}
.id DESC"
).
page
(
params
[
:page
]).
per
(
20
)
@shared_runners
=
Ci
::
Runner
.
shared
.
active
@shared_runners_count
=
@shared_runners
.
count
(
:all
)
...
...
app/views/ci/builds/show.html.haml
浏览文件 @
c1de46db
...
...
@@ -2,7 +2,7 @@
=
link_to
ci_project_path
(
@project
)
@
=
@commit
.
short_sha
%p
=
link_to
ci_project_ref_commits_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
do
←
Back to project commit
...
...
@@ -104,7 +104,7 @@
#{
time_ago_in_words
(
@build
.
finished_at
)
}
ago
%p
%span
.attr-name
Runner:
-
if
@build
.
runner
&&
current_user
&&
current_user
.
is_
admin
-
if
@build
.
runner
&&
current_user
&&
current_user
.
admin
\
#{
link_to
"##{@build.runner.id}"
,
ci_admin_runner_path
(
@build
.
runner
.
id
)
}
-
elsif
@build
.
runner
\##{@build.runner.id}
...
...
app/views/layouts/ci/project.html.haml
浏览文件 @
c1de46db
...
...
@@ -17,7 +17,7 @@
%hr
.container.container-body
.content
-
if
current_user
&&
can?
(
current_user
,
:
manage
_project
,
gl_project
)
-
if
current_user
&&
can?
(
current_user
,
:
admin
_project
,
gl_project
)
.row
.col-md-2.append-bottom-20
=
render
'layouts/ci/nav_project'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录