Commit 38a97197 authored by Clement Ho's avatar Clement Ho

Fix disable storing of sensitive information when importing a new repo

parent 6aec85ac
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
= f.label :import_url, class: 'control-label' do = f.label :import_url, class: 'control-label' do
%span Git repository URL %span Git repository URL
.col-sm-10 .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 .well.prepend-top-20
%ul %ul
......
---
title: Fix disable storing of sensitive information when importing a new repo
merge_request: 8885
author: Bernard Pietraga
require "spec_helper" require "spec_helper"
feature "New project", feature: true do 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| Gitlab::VisibilityLevel.options.each do |key, level|
it "sets selector to #{key}" do it "sets selector to #{key}" do
stub_application_setting(default_project_visibility: level) stub_application_setting(default_project_visibility: level)
...@@ -16,4 +18,16 @@ feature "New project", feature: true do ...@@ -16,4 +18,16 @@ feature "New project", feature: true do
end end
end 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 end
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