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-25 00:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 00:09:08 +0300
commit7671216b60e2796a050358ff808b4a0c2de3d22f (patch)
tree605dfc1339a3cd7dc7353ac6d725191086a9acca /config/initializers
parentc2367afbf57ebc65d5b78a743b5d6a91f0aece9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/0_license.rb20
1 files changed, 5 insertions, 15 deletions
diff --git a/config/initializers/0_license.rb b/config/initializers/0_license.rb
index 19c71c34904..e7b46a14630 100644
--- a/config/initializers/0_license.rb
+++ b/config/initializers/0_license.rb
@@ -1,19 +1,9 @@
# frozen_string_literal: true
Gitlab.ee do
- begin
- public_key_file = File.read(Rails.root.join(".license_encryption_key.pub"))
- public_key = OpenSSL::PKey::RSA.new(public_key_file)
- Gitlab::License.encryption_key = public_key
- rescue
- warn "WARNING: No valid license encryption key provided."
- end
-
- # Needed to run migration
- 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}"
- end
- end
+ public_key_file = File.read(Rails.root.join(".license_encryption_key.pub"))
+ public_key = OpenSSL::PKey::RSA.new(public_key_file)
+ Gitlab::License.encryption_key = public_key
+rescue
+ warn "WARNING: No valid license encryption key provided."
end