Commit 2858dc5e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '9445-kerberos-clone-url-is-no-longer-visible' into 'master'

Add Kerberos URL back to clone panel

Closes #9445

See merge request gitlab-org/gitlab-ee!9840
parents 5cbed723 d4ee7055
......@@ -7,7 +7,7 @@
= sprite_icon("arrow-down", css_class: "icon")
%ul.p-3.dropdown-menu.dropdown-menu-right.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options
- if ssh_enabled?
%li.pb-2
%li
%label.label-bold
= _('Clone with SSH')
.input-group
......@@ -16,7 +16,7 @@
= clipboard_button(target: '#ssh_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")
= render_if_exists 'projects/buttons/geo'
- if http_enabled?
%li
%li.pt-2
%label.label-bold
= _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase }
.input-group
......@@ -24,5 +24,6 @@
.input-group-append
= clipboard_button(target: '#http_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")
= render_if_exists 'projects/buttons/geo'
= render_if_exists 'projects/buttons/kerberos_clone_field'
= render_if_exists 'shared/geo_info_modal', project: project
......@@ -13,3 +13,4 @@
- if http_enabled?
%li
= dropdown_item_with_description(http_copy_label, project.http_url_to_repo, href: project.http_url_to_repo, data: { clone_type: 'http' })
= render_if_exists 'shared/mobile_kerberos_clone'
- project = project || @project
- if alternative_kerberos_url?
%li.pt-2
%label.label-bold
= _('Clone with KRB5')
.input-group
= text_field_tag :kerberos_project_clone, project.kerberos_url_to_repo, class: "js-select-on-focus form-control qa-krb5-clone-url", readonly: true, aria: { label: 'Project clone URL' }
.input-group-append
= clipboard_button(target: '#kerberos_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")
= render_if_exists 'projects/buttons/geo'
- project = project || @project
- krb5_copy_label = _('Copy KRB5 clone URL')
- if alternative_kerberos_url?
%li
= dropdown_item_with_description(krb5_copy_label, project.kerberos_url_to_repo, href: project.kerberos_url_to_repo, data: { clone_type: 'krb5' })
---
title: Add Kerberos URL back to clone panel
merge_request: 9840
author:
type: changed
# frozen_string_literal: true
require 'rails_helper'
describe 'Kerberos clone instructions', :js do
include MobileHelpers
let(:project) { create(:project, :empty_repo) }
let(:admin) { create(:admin) }
before do
sign_in(admin)
allow(Gitlab.config.kerberos).to receive(:enabled).and_return(true)
end
it 'shows Kerberos clone url' do
visit_project
find('.clone-dropdown-btn').click
expect(page).to have_content(project.kerberos_url_to_repo)
within('.git-clone-holder') do
expect(page).to have_content('Clone with KRB5')
end
end
context 'mobile component' do
it 'shows the Kerberos clone information' do
resize_screen_xs
visit_project
find('.dropdown-toggle').click
expect(page).to have_content('Copy KRB5 clone URL')
end
end
def visit_project
visit project_path(project)
end
end
......@@ -2061,6 +2061,9 @@ msgstr ""
msgid "Clone with %{http_label}"
msgstr ""
msgid "Clone with KRB5"
msgstr ""
msgid "Clone with SSH"
msgstr ""
......@@ -2879,6 +2882,9 @@ msgstr ""
msgid "Copy ID to clipboard"
msgstr ""
msgid "Copy KRB5 clone URL"
msgstr ""
msgid "Copy SSH clone URL"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment