summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTakuya Noguchi <tak.noguchi.iridge@gmail.com>2017-07-11 01:09:16 +0900
committerTakuya Noguchi <tak.noguchi.iridge@gmail.com>2017-07-11 09:31:38 +0900
commit53067cd7b3116994552428a2586efb7ace0399d6 (patch)
treef399c02d22415f22ba149500e6f5d16b21e817d8 /app
parent4daa6da5407d235cbe4f7a787eaa29304446a870 (diff)
downloadgitlab-ce-53067cd7b3116994552428a2586efb7ace0399d6.tar.gz
Do not show pipeline schedule button for non-member
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/pipeline_schedules/index.html.haml7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml
index 05fe80e5fed..c4ee064ac43 100644
--- a/app/views/projects/pipeline_schedules/index.html.haml
+++ b/app/views/projects/pipeline_schedules/index.html.haml
@@ -12,9 +12,10 @@
- schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) }
= render "tabs", schedule_path_proc: schedule_path_proc, all_schedules: @all_schedules, scope: @scope
- .nav-controls
- = link_to new_project_pipeline_schedule_path(@project), class: 'btn btn-create' do
- %span= _('New schedule')
+ - if can?(current_user, :create_pipeline_schedule, @project)
+ .nav-controls
+ = link_to new_project_pipeline_schedule_path(@project), class: 'btn btn-create' do
+ %span= _('New schedule')
- if @schedules.present?
%ul.content-list