mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
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:
parent
85d2b5fa48
commit
c2fd090d7d
|
@ -31,15 +31,7 @@
|
||||||
|
|
||||||
<dt>{{i18n "ip_lookup.location"}}</dt>
|
<dt>{{i18n "ip_lookup.location"}}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{#if this.location.no_license}}
|
{{#if this.location.location}}
|
||||||
<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}}
|
|
||||||
<a
|
<a
|
||||||
href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}"
|
href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|
|
@ -1078,7 +1078,6 @@ en:
|
||||||
confirm_delete_other_accounts: "Are you sure you want to delete these accounts?"
|
confirm_delete_other_accounts: "Are you sure you want to delete these accounts?"
|
||||||
powered_by: "using <a href='https://maxmind.com'>MaxMindDB</a>"
|
powered_by: "using <a href='https://maxmind.com'>MaxMindDB</a>"
|
||||||
copied: "copied"
|
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:
|
user_fields:
|
||||||
none: "(select an option)"
|
none: "(select an option)"
|
||||||
|
|
|
@ -105,8 +105,6 @@ class DiscourseIpInfo
|
||||||
message: "IP #{ip} could not be looked up in MaxMind GeoLite2-City database.",
|
message: "IP #{ip} could not be looked up in MaxMind GeoLite2-City database.",
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
ret[:no_license] = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if @asn_mmdb
|
if @asn_mmdb
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
RSpec.describe UserAuthTokenSerializer do
|
RSpec.describe UserAuthTokenSerializer do
|
||||||
fab!(:user) { Fabricate(:moderator) }
|
fab!(:user) { Fabricate(:moderator) }
|
||||||
let(:token) { UserAuthToken.generate!(user_id: user.id, client_ip: "2a02:ea00::", staff: true) }
|
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")) }
|
before(:each) { DiscourseIpInfo.open_db(File.join(Rails.root, "spec", "fixtures", "mmdb")) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user