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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 12:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 12:08:51 +0300
commit38149afcf95e7669a7a99828c579d185b70c04dc (patch)
tree3a90504bd926407c0cc60f44e20dba08217b928b /config/initializers
parentbe660fe1d28a65ad61be24c71e66ae90f6488dc4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/0_license.rb2
-rw-r--r--config/initializers/omniauth.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/0_license.rb b/config/initializers/0_license.rb
index 5c4546f499f..19c71c34904 100644
--- a/config/initializers/0_license.rb
+++ b/config/initializers/0_license.rb
@@ -10,7 +10,7 @@ Gitlab.ee do
end
# Needed to run migration
- if Gitlab::Database.cached_table_exists?('licenses')
+ if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('licenses')
message = LicenseHelper.license_message(signed_in: true, is_admin: true, in_html: false)
if ::License.block_changes? && message.present?
warn "WARNING: #{message}"
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index ef23ca065c6..0e4cb88b50f 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -16,3 +16,7 @@ OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_s
OmniAuth.config.before_request_phase do |env|
Gitlab::RequestForgeryProtection.call(env)
end
+
+# Use json formatter
+OmniAuth.config.logger.formatter = Gitlab::OmniauthLogging::JSONFormatter.new
+OmniAuth.config.logger.level = Logger::ERROR if Rails.env.production?