diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 00:09:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 00:09:08 +0300 |
commit | 7671216b60e2796a050358ff808b4a0c2de3d22f (patch) | |
tree | 605dfc1339a3cd7dc7353ac6d725191086a9acca /config | |
parent | c2367afbf57ebc65d5b78a743b5d6a91f0aece9f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/0_license.rb | 20 |
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 |