diff options
author | Filipa Lacerda <lacerda.filipa@gmail.com> | 2017-01-31 15:15:36 +0000 |
---|---|---|
committer | Filipa Lacerda <lacerda.filipa@gmail.com> | 2017-01-31 15:15:36 +0000 |
commit | 1ccccccf7f2fd9b7af7c8f56bd8040b9b685d1c2 (patch) | |
tree | 3dd22a6ffbdb404c20294a0b7e4f168973f9a391 | |
parent | 9295fb20b77e303a0a0c00df77cca917000de18c (diff) | |
parent | 38a97197b7c1baf96a9960e70c60f4b7431082f7 (diff) | |
download | gitlab-ce-1ccccccf7f2fd9b7af7c8f56bd8040b9b685d1c2.tar.gz |
Merge branch '23767-disable-storing-of-sensitive-information' into 'master'
Fix disable storing of sensitive information when importing a new repo
Closes #23767
See merge request !8885
-rw-r--r-- | app/views/shared/_import_form.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/23767-disable-storing-of-sensitive-information.yml | 4 | ||||
-rw-r--r-- | spec/features/projects/new_project_spec.rb | 20 |
3 files changed, 22 insertions, 4 deletions
diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index 65a3a6bddab..300022d4ad6 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -2,7 +2,7 @@ = f.label :import_url, class: 'control-label' do %span Git repository URL .col-sm-10 - = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git', disabled: true + = f.text_field :import_url, autocomplete: 'off', class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git', disabled: true .well.prepend-top-20 %ul diff --git a/changelogs/unreleased/23767-disable-storing-of-sensitive-information.yml b/changelogs/unreleased/23767-disable-storing-of-sensitive-information.yml new file mode 100644 index 00000000000..587ef4f9a73 --- /dev/null +++ b/changelogs/unreleased/23767-disable-storing-of-sensitive-information.yml @@ -0,0 +1,4 @@ +--- +title: Fix disable storing of sensitive information when importing a new repo +merge_request: 8885 +author: Bernard Pietraga diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb index abfc46601fb..b56e562b2b6 100644 --- a/spec/features/projects/new_project_spec.rb +++ b/spec/features/projects/new_project_spec.rb @@ -1,11 +1,13 @@ require "spec_helper" feature "New project", feature: true do - context "Visibility level selector" do - let(:user) { create(:admin) } + let(:user) { create(:admin) } - before { login_as(user) } + before do + login_as(user) + end + context "Visibility level selector" do Gitlab::VisibilityLevel.options.each do |key, level| it "sets selector to #{key}" do stub_application_setting(default_project_visibility: level) @@ -16,4 +18,16 @@ feature "New project", feature: true do end end end + + context 'Import project options' do + before do + visit new_project_path + end + + it 'does not autocomplete sensitive git repo URL' do + autocomplete = find('#project_import_url')['autocomplete'] + + expect(autocomplete).to eq('off') + end + end end |