diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-10-05 21:56:23 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-10-16 10:19:18 +0200 |
commit | c909b6aa6d62a4c556a866166d0a98c952d2ef62 (patch) | |
tree | cacc5c8f07a4a9b23e15e2ba2aa9a80e54ffb0e3 /app | |
parent | 2087f121bfedd2f51eb943f23026e823d196466a (diff) | |
download | gitlab-ce-c909b6aa6d62a4c556a866166d0a98c952d2ef62.tar.gz |
Prevent creating multiple ApplicationSetting by forcing it to always have id=1prevent-creating-multiple-application-settings
Diffstat (limited to 'app')
-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 c0cc60d5ebf..5b5bb3cbe2c 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -33,6 +33,8 @@ class ApplicationSetting < ActiveRecord::Base attr_accessor :domain_whitelist_raw, :domain_blacklist_raw + default_value_for :id, 1 + validates :uuid, presence: true validates :session_expire_delay, |