summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-08-30 21:20:00 +0100
committerNick Thomas <nick@gitlab.com>2017-08-30 21:20:00 +0100
commit29b40db58944a32db6cf1ae9906653a2e5f4be9d (patch)
treee5a8746dfbbbae708178f3e60bd6be1d41c518f8 /app/models/application_setting.rb
parenteb05bdc6f589f6f0713df12582eb9f18fc4022b3 (diff)
downloadgitlab-ce-29b40db58944a32db6cf1ae9906653a2e5f4be9d.tar.gz
More review comments
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb2
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)