diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-06-15 17:30:55 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-05 16:54:22 -0500 |
commit | 512adc21feff5135de94d23ed6808296b365490a (patch) | |
tree | a1067fee6ea02eeae2f13750f17b64ff7544a9b0 /app/models/application_setting.rb | |
parent | 1141eaf5c83f927ccc064b6c5d162081fdd22894 (diff) | |
download | gitlab-ce-512adc21feff5135de94d23ed6808296b365490a.tar.gz |
Add setting that allows admins to choose which Git access protocols are enabled
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r-- | app/models/application_setting.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 5fa6eacd234..7d0114fc549 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -59,6 +59,8 @@ class ApplicationSetting < ActiveRecord::Base presence: true, inclusion: { in: ->(_object) { Gitlab.config.repositories.storages.keys } } + validates_inclusion_of :enabled_git_access_protocols, in: %w(ssh http), allow_blank: true, allow_nil: true + validates_each :restricted_visibility_levels do |record, attr, value| unless value.nil? value.each do |level| |