diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-10-17 13:53:42 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-10-17 13:53:42 +0000 |
commit | 65a1cbc600cf36ff5db9644072e4bf1e2b8e5cde (patch) | |
tree | 0354292dccf0debc90d55a00937d4033453603e0 /app/models/application_setting.rb | |
parent | 526c47618e446bfec776b6e17462298f17fb24ee (diff) | |
parent | c909b6aa6d62a4c556a866166d0a98c952d2ef62 (diff) | |
download | gitlab-ce-65a1cbc600cf36ff5db9644072e4bf1e2b8e5cde.tar.gz |
Merge branch 'prevent-creating-multiple-application-settings' into 'master'
Prevent creating multiple ApplicationSetting by forcing it to always have id=1
Closes #34728
See merge request gitlab-org/gitlab-ce!14718
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 a93b777a9bc..d3b8debb0fd 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, |