diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-06-29 14:30:27 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-05 16:54:22 -0500 |
commit | fbaabb3911c6fec25edc25bfffad94ae2a7c0e28 (patch) | |
tree | f8ec3e24dbff92c06e651e47a48c4ed47c277897 /app | |
parent | 120a1189bfa8b2afa7a8274c5617808f88f36101 (diff) | |
download | gitlab-ce-fbaabb3911c6fec25edc25bfffad94ae2a7c0e28.tar.gz |
Rename `enabled_git_access_protocols` to singular.
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 4 | ||||
-rw-r--r-- | app/models/application_setting.rb | 2 | ||||
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 19403388dc6..6b0dde5dfe6 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -32,11 +32,11 @@ module ApplicationSettingsHelper end def allowed_protocols_present? - current_application_settings.enabled_git_access_protocols.present? + current_application_settings.enabled_git_access_protocol.present? end def enabled_protocol - case current_application_settings.enabled_git_access_protocols + case current_application_settings.enabled_git_access_protocol when 'http' gitlab_config.protocol when 'ssh' diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 314e69fa8b6..7bf618d60b9 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -59,7 +59,7 @@ class ApplicationSetting < ActiveRecord::Base presence: true, inclusion: { in: ->(_object) { Gitlab.config.repositories.storages.keys } } - validates :enabled_git_access_protocols, + validates :enabled_git_access_protocol, inclusion: { in: %w(ssh http), allow_blank: true, allow_nil: true } validates_each :restricted_visibility_levels do |record, attr, value| diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 99bf2701f64..eb325576e4f 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -46,7 +46,7 @@ .form-group %label.control-label.col-sm-2 Enabled Git access protocols .col-sm-10 - = select(:application_setting, :enabled_git_access_protocols, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') + = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') %span.help-block#clone-protocol-help Allow only the selected protocols to be used for Git access. .form-group |