BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
87118872
Commit
87118872
authored
Dec 05, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conditions for checking pipeline schedule rules
parent
bc2d32ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
pipeline_schedule_policy.rb
app/policies/ci/pipeline_schedule_policy.rb
+3
-3
_pipeline_schedule.html.haml
.../projects/pipeline_schedules/_pipeline_schedule.html.haml
+1
-1
No files found.
app/policies/ci/pipeline_schedule_policy.rb
View file @
87118872
...
@@ -6,11 +6,11 @@ module Ci
...
@@ -6,11 +6,11 @@ module Ci
access
=
::
Gitlab
::
UserAccess
.
new
(
@user
,
project:
@subject
.
project
)
access
=
::
Gitlab
::
UserAccess
.
new
(
@user
,
project:
@subject
.
project
)
if
@subject
.
project
.
repository
.
branch_exists?
(
@subject
.
ref
)
if
@subject
.
project
.
repository
.
branch_exists?
(
@subject
.
ref
)
access
.
can_update_branch?
(
@subject
.
ref
)
!
access
.
can_update_branch?
(
@subject
.
ref
)
elsif
@subject
.
project
.
repository
.
tag_exists?
(
@subject
.
ref
)
elsif
@subject
.
project
.
repository
.
tag_exists?
(
@subject
.
ref
)
access
.
can_create_tag?
(
@subject
.
ref
)
!
access
.
can_create_tag?
(
@subject
.
ref
)
else
else
tru
e
fals
e
end
end
end
end
...
...
app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml
View file @
87118872
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
%td
%td
.pull-right.btn-group
.pull-right.btn-group
-
if
can?
(
current_user
,
:play_pipeline_schedule
,
pipeline_schedule
)
-
if
can?
(
current_user
,
:play_pipeline_schedule
,
pipeline_schedule
)
=
link_to
run
_pipeline_schedule_path
(
pipeline_schedule
),
method: :post
,
title:
s_
(
'Play'
),
class:
'btn'
do
=
link_to
play
_pipeline_schedule_path
(
pipeline_schedule
),
method: :post
,
title:
s_
(
'Play'
),
class:
'btn'
do
=
icon
(
'play'
)
=
icon
(
'play'
)
-
if
can?
(
current_user
,
:update_pipeline_schedule
,
pipeline_schedule
)
-
if
can?
(
current_user
,
:update_pipeline_schedule
,
pipeline_schedule
)
=
link_to
take_ownership_pipeline_schedule_path
(
pipeline_schedule
),
method: :post
,
title:
s_
(
'PipelineSchedules|Take ownership'
),
class:
'btn'
do
=
link_to
take_ownership_pipeline_schedule_path
(
pipeline_schedule
),
method: :post
,
title:
s_
(
'PipelineSchedules|Take ownership'
),
class:
'btn'
do
...
...
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