summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-02-17 14:04:10 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2017-03-06 15:41:25 +0100
commit80fbced2e0b8d291173e1002f150bc5551e87359 (patch)
treea01252328c2d7efd095d92d7c48022fbfc244e14 /app/models/application_setting.rb
parent5173c0939386b8fbf4632d755849bcafc863872e (diff)
downloadgitlab-ce-80fbced2e0b8d291173e1002f150bc5551e87359.tar.gz
Add admin settings entries
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 2f64fb1a6a2..be632930895 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -64,6 +64,16 @@ class ApplicationSetting < ActiveRecord::Base
presence: true,
if: :akismet_enabled
+ validates :unique_ips_limit_per_user,
+ numericality: { greater_than_or_equal_to: 1 },
+ presence: true,
+ if: :unique_ips_limit_enabled
+
+ validates :unique_ips_limit_time_window,
+ numericality: { greater_than_or_equal_to: 0 },
+ presence: true,
+ if: :unique_ips_limit_enabled
+
validates :koding_url,
presence: true,
if: :koding_enabled