Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 25b81aef45f..661b10019ad 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -5,11 +5,14 @@ class ApplicationSetting < ApplicationRecord
include CacheMarkdownField
include TokenAuthenticatable
include ChronicDurationAttribute
+ include IgnorableColumns
+
+ ignore_column :namespace_storage_size_limit, remove_with: '13.5', remove_after: '2020-09-22'
GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \
'Admin Area > Settings > Metrics and profiling > Metrics - Grafana'
- add_authentication_token_field :runners_registration_token, encrypted: -> { Feature.enabled?(:application_settings_tokens_optional_encryption, default_enabled: true) ? :optional : :required }
+ add_authentication_token_field :runners_registration_token, encrypted: -> { Feature.enabled?(:application_settings_tokens_optional_encryption) ? :optional : :required }
add_authentication_token_field :health_check_access_token
add_authentication_token_field :static_objects_external_storage_auth_token
@@ -272,6 +275,7 @@ class ApplicationSetting < ApplicationRecord
numericality: { greater_than_or_equal_to: 0 }
validates :snippet_size_limit, numericality: { only_integer: true, greater_than: 0 }
+ validates :wiki_page_max_content_bytes, numericality: { only_integer: true, greater_than_or_equal_to: 1.kilobytes }
validates :email_restrictions, untrusted_regexp: true
@@ -362,10 +366,6 @@ class ApplicationSetting < ApplicationRecord
length: { maximum: 255 },
allow_blank: true
- validates :namespace_storage_size_limit,
- presence: true,
- numericality: { only_integer: true, greater_than_or_equal_to: 0 }
-
validates :issues_create_limit,
numericality: { only_integer: true, greater_than_or_equal_to: 0 }