diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-06-20 20:40:56 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-05 16:54:22 -0500 |
commit | 7735ef86f0714a5b2a4cb4db8ec0471654563885 (patch) | |
tree | 5f56b0348da8870736339150b669069f84e43fd1 /app/models/application_setting.rb | |
parent | ea9d910c8bd2774cf48a5b6092704143a7505011 (diff) | |
download | gitlab-ce-7735ef86f0714a5b2a4cb4db8ec0471654563885.tar.gz |
Only allow Git Access on the allowed protocol
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r-- | app/models/application_setting.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 7d0114fc549..314e69fa8b6 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -59,7 +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 :enabled_git_access_protocols, + inclusion: { in: %w(ssh http), allow_blank: true, allow_nil: true } validates_each :restricted_visibility_levels do |record, attr, value| unless value.nil? |