DEV: revert missing license for maxmind changes (#24538)

Reverts
 
 - DEV: maxmind license checking failing tests #24534 
 - UX: Show if MaxMind key is missing on IP lookup #18993

These changes are leading to surprising results, our logs are now filling up with warnings on dev environments 

We need the change to be redone
This commit is contained in:
Sam 2023-11-24 11:31:11 +11:00 committed by GitHub
parent 85d2b5fa48
commit c2fd090d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 13 deletions

View File

@ -31,15 +31,7 @@
<dt>{{i18n "ip_lookup.location"}}</dt>
<dd>
{{#if this.location.no_license}}
<a
href="https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups/173941"
rel="noopener noreferrer"
target="_blank"
>
{{i18n "ip_lookup.no_license"}}
</a>
{{else if this.location.location}}
{{#if this.location.location}}
<a
href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}"
rel="noopener noreferrer"

View File

@ -1078,7 +1078,6 @@ en:
confirm_delete_other_accounts: "Are you sure you want to delete these accounts?"
powered_by: "using <a href='https://maxmind.com'>MaxMindDB</a>"
copied: "copied"
no_license: "You must configure MaxMind to enable GeoIP information. This is configured using DISCOURSE_MAXMIND_LICENSE_KEY in your container config. If you are on a hosted Discourse service, contact your service provider."
user_fields:
none: "(select an option)"

View File

@ -105,8 +105,6 @@ class DiscourseIpInfo
message: "IP #{ip} could not be looked up in MaxMind GeoLite2-City database.",
)
end
else
ret[:no_license] = true
end
if @asn_mmdb

View File

@ -3,7 +3,6 @@
RSpec.describe UserAuthTokenSerializer do
fab!(:user) { Fabricate(:moderator) }
let(:token) { UserAuthToken.generate!(user_id: user.id, client_ip: "2a02:ea00::", staff: true) }
# Assign a dummy MaxMind license key, which is now checked in open_db
before(:each) { DiscourseIpInfo.open_db(File.join(Rails.root, "spec", "fixtures", "mmdb")) }