diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-01-31 14:28:31 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-02-06 21:46:59 +0300 |
commit | 433bcf9b0439771b1e2661a62fec115e44922232 (patch) | |
tree | 9587b4fb6cd4b87211b9f9a16d9e4c211a7d273f /app/models/application_setting.rb | |
parent | d0187de202d94fa445a28c347b7a54dbf09a22a8 (diff) |
Add local markdown version
Cached markdown version is composed both from global and local
markdown version. This allows admins to bump version locally when
needed (e.g. when external URL is changed).
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r-- | app/models/application_setting.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 88746375c67..c658211d12d 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -193,6 +193,10 @@ class ApplicationSetting < ActiveRecord::Base allow_nil: true, numericality: { only_integer: true, greater_than_or_equal_to: 1.day.seconds } + validates :local_markdown_version, + allow_nil: true, + numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than: 65536 } + SUPPORTED_KEY_TYPES.each do |type| validates :"#{type}_key_restriction", presence: true, key_restriction: { type: type } end @@ -303,7 +307,8 @@ class ApplicationSetting < ActiveRecord::Base usage_stats_set_by_user_id: nil, diff_max_patch_bytes: Gitlab::Git::Diff::DEFAULT_MAX_PATCH_BYTES, commit_email_hostname: default_commit_email_hostname, - protected_ci_variables: false + protected_ci_variables: false, + local_markdown_version: 0 } end |