diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 13:57:58 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 13:59:16 -0300 |
commit | 44d33db12a93f796769c1f470c922f1daafea971 (patch) | |
tree | 31a54570e7f284c595ff40e52c3271aba5ae2015 | |
parent | 3956bb552fe22feb0c5542e8cd9d06bb43be9650 (diff) | |
download | gitlab-ce-44d33db12a93f796769c1f470c922f1daafea971.tar.gz |
Unify use of can_current_user_push_code Presenter42431-add-auto-devops-and-clusters-button-to-projects
-rw-r--r-- | app/views/projects/buttons/_koding.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/empty.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/buttons/_koding.html.haml b/app/views/projects/buttons/_koding.html.haml index b9cec834ab4..e665ca61da8 100644 --- a/app/views/projects/buttons/_koding.html.haml +++ b/app/views/projects/buttons/_koding.html.haml @@ -1,3 +1,3 @@ -- if koding_enabled? && current_user && @repository.koding_yml && @project.user_can_push_to_branch?(current_user, @project.default_branch) +- if koding_enabled? && current_user && @repository.koding_yml && @project.can_current_user_push_code? = link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank', rel: 'noopener noreferrer' do _('Run in IDE (Koding)') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 08282c820d5..8a36fada389 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -11,7 +11,7 @@ %h4 = _('The repository for this project is empty') - - if can?(current_user, :push_code, @project) + - if @project.can_current_user_push_code? %p - link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions' = _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli } |