diff options
author | Nick Thomas <nick@gitlab.com> | 2017-08-30 21:20:00 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-08-30 21:20:00 +0100 |
commit | 29b40db58944a32db6cf1ae9906653a2e5f4be9d (patch) | |
tree | e5a8746dfbbbae708178f3e60bd6be1d41c518f8 /app/models/application_setting.rb | |
parent | eb05bdc6f589f6f0713df12582eb9f18fc4022b3 (diff) | |
download | gitlab-ce-29b40db58944a32db6cf1ae9906653a2e5f4be9d.tar.gz |
More review comments
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 2c61717d0e0..3568e72e463 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -155,6 +155,8 @@ class ApplicationSetting < ActiveRecord::Base validates :"#{type}_key_restriction", presence: true, key_restriction: { type: type } end + validates :allowed_key_types, presence: true + validates_each :restricted_visibility_levels do |record, attr, value| value&.each do |level| unless Gitlab::VisibilityLevel.options.value?(level) |