Commit 44c940391701c8ac6715a90a707db0c255e016d9
1 parent
aaff3566
Exists in
spb-stable
and in
3 other branches
Hide retry import form for non masters
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
13 additions
and
12 deletions
Show diff stats
app/views/projects/import.html.haml
... | ... | @@ -15,15 +15,16 @@ |
15 | 15 | %h2 |
16 | 16 | Import failed. Retry? |
17 | 17 | %hr |
18 | - = form_for @project, url: retry_import_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f| | |
19 | - .form-group.import-url-data | |
20 | - = f.label :import_url, class: 'control-label' do | |
21 | - %span Import existing repo | |
22 | - .col-sm-10 | |
23 | - = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git' | |
24 | - .bs-callout.bs-callout-info | |
25 | - This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git. | |
26 | - %br | |
27 | - The import will time out after 2 minutes. For big repositories, use a clone/push combination. | |
28 | - .form-actions | |
29 | - = f.submit 'Retry import', class: "btn btn-create", tabindex: 4 | |
18 | + - if can?(current_user, :admin_project, @project) | |
19 | + = form_for @project, url: retry_import_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f| | |
20 | + .form-group.import-url-data | |
21 | + = f.label :import_url, class: 'control-label' do | |
22 | + %span Import existing repo | |
23 | + .col-sm-10 | |
24 | + = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git' | |
25 | + .bs-callout.bs-callout-info | |
26 | + This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git. | |
27 | + %br | |
28 | + The import will time out after 2 minutes. For big repositories, use a clone/push combination. | |
29 | + .form-actions | |
30 | + = f.submit 'Retry import', class: "btn btn-create", tabindex: 4 | ... | ... |