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
Jérome Perrin
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/policies/ci/pipeline_schedule_policy.rb
app/policies/ci/pipeline_schedule_policy.rb
+3
-3
app/views/projects/pipeline_schedules/_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
access
=
::
Gitlab
::
UserAccess
.
new
(
@user
,
project:
@subject
.
project
)
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
)
access
.
can_create_tag?
(
@subject
.
ref
)
!
access
.
can_create_tag?
(
@subject
.
ref
)
else
tru
e
fals
e
end
end
...
...
app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml
View file @
87118872
...
...
@@ -27,7 +27,7 @@
%td
.pull-right.btn-group
-
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'
)
-
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
...
...
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