Merge branch '42206-permit-password-for-git-param' into 'master'

Resolve "Password authentication enabled for Git over HTTP(S) can not be disabled via UI"

Closes #42206

See merge request gitlab-org/gitlab-ce!16577
This commit is contained in:
Rémy Coutable 2018-01-22 08:31:09 +00:00
commit 63dbcd2483
3 changed files with 13 additions and 0 deletions

View file

@ -201,6 +201,7 @@ module ApplicationSettingsHelper
:metrics_sample_interval,
:metrics_timeout,
:password_authentication_enabled_for_web,
:password_authentication_enabled_for_git,
:performance_bar_allowed_group_id,
:performance_bar_enabled,
:plantuml_enabled,

View file

@ -0,0 +1,5 @@
---
title: Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController
merge_request:
author:
type: fixed

View file

@ -51,6 +51,13 @@ describe Admin::ApplicationSettingsController do
sign_in(admin)
end
it 'updates the password_authentication_enabled_for_git setting' do
put :update, application_setting: { password_authentication_enabled_for_git: "0" }
expect(response).to redirect_to(admin_application_settings_path)
expect(ApplicationSetting.current.password_authentication_enabled_for_git).to eq(false)
end
it 'updates the default_project_visibility for string value' do
put :update, application_setting: { default_project_visibility: "20" }