Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
08064767
Commit
08064767
authored
Feb 05, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove current_user && when can? is used
parent
170ca843
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/views/admin/builds/_build.html.haml
app/views/admin/builds/_build.html.haml
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
No files found.
app/views/admin/builds/_build.html.haml
View file @
08064767
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
-
if
can?
(
current_user
,
:read_build
,
project
)
&&
build
.
artifacts?
-
if
can?
(
current_user
,
:read_build
,
project
)
&&
build
.
artifacts?
=
link_to
build
.
artifacts_download_url
,
title:
'Download artifacts'
do
=
link_to
build
.
artifacts_download_url
,
title:
'Download artifacts'
do
%i
.fa.fa-download
%i
.fa.fa-download
-
if
c
urrent_user
&&
c
an?
(
current_user
,
:update_build
,
build
.
project
)
-
if
can?
(
current_user
,
:update_build
,
build
.
project
)
-
if
build
.
active?
-
if
build
.
active?
-
if
build
.
cancel_url
-
if
build
.
cancel_url
=
link_to
build
.
cancel_url
,
method: :post
,
title:
'Cancel'
do
=
link_to
build
.
cancel_url
,
method: :post
,
title:
'Cancel'
do
...
...
app/views/projects/builds/show.html.haml
View file @
08064767
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
.build-widget
.build-widget
%h4
.title
%h4
.title
Build ##{@build.id}
Build ##{@build.id}
-
if
c
urrent_user
&&
c
an?
(
current_user
,
:update_build
,
@project
)
-
if
can?
(
current_user
,
:update_build
,
@project
)
.pull-right
.pull-right
-
if
@build
.
cancel_url
-
if
@build
.
cancel_url
=
link_to
"Cancel"
,
@build
.
cancel_url
,
class:
'btn btn-sm btn-danger'
,
method: :post
=
link_to
"Cancel"
,
@build
.
cancel_url
,
class:
'btn btn-sm btn-danger'
,
method: :post
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment