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:
authorRobin Bobbitt <ryehle@us.ibm.com>2017-06-13 19:46:02 +0300
committerRobin Bobbitt <ryehle@us.ibm.com>2017-06-14 18:40:21 +0300
commite09ddc62b32256baa3a0676e0fd68b38e72cafcd (patch)
treea583b0927d22ebb2a122ceaaacc7a1e767b81a54 /app/models/application_setting.rb
parent5bea82de7f4e601e4c69cf5de718514c17286994 (diff)
Help landing page customizations
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 2192f76499d..668caef0d2c 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -37,7 +37,12 @@ class ApplicationSetting < ActiveRecord::Base
validates :home_page_url,
allow_blank: true,
url: true,
- if: :home_page_url_column_exist
+ if: :home_page_url_column_exists?
+
+ validates :help_page_support_url,
+ allow_blank: true,
+ url: true,
+ if: :help_page_support_url_column_exists?
validates :after_sign_out_path,
allow_blank: true,
@@ -215,6 +220,7 @@ class ApplicationSetting < ActiveRecord::Base
domain_whitelist: Settings.gitlab['domain_whitelist'],
gravatar_enabled: Settings.gravatar['enabled'],
help_page_text: nil,
+ help_page_hide_commercial_content: false,
unique_ips_limit_per_user: 10,
unique_ips_limit_time_window: 3600,
unique_ips_limit_enabled: false,
@@ -263,10 +269,14 @@ class ApplicationSetting < ActiveRecord::Base
end
end
- def home_page_url_column_exist
+ def home_page_url_column_exists?
ActiveRecord::Base.connection.column_exists?(:application_settings, :home_page_url)
end
+ def help_page_support_url_column_exists?
+ ActiveRecord::Base.connection.column_exists?(:application_settings, :help_page_support_url)
+ end
+
def sidekiq_throttling_column_exists?
ActiveRecord::Base.connection.column_exists?(:application_settings, :sidekiq_throttling_enabled)
end