diff options
author | Mark Fletcher <mark@gitlab.com> | 2018-01-19 15:04:45 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2018-01-19 15:04:45 +0300 |
commit | 6dcba97c83acfde801db0d51a3911d58f8f5e45a (patch) | |
tree | 4067a051dc44a51dfe05ebfc5dbe4420cb454113 | |
parent | ee58763158ed10f12a8fe7c089257a532fe6e724 (diff) |
Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController
3 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 45f7d29eb05..8ef561d90e6 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -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, diff --git a/changelogs/unreleased/42206-permit-password-for-git-param.yml b/changelogs/unreleased/42206-permit-password-for-git-param.yml new file mode 100644 index 00000000000..563dd528ad5 --- /dev/null +++ b/changelogs/unreleased/42206-permit-password-for-git-param.yml @@ -0,0 +1,5 @@ +--- +title: Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController +merge_request: +author: +type: fixed diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 2565622f8df..cc1b1e5039e 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -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" } |