Add IP location service
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-12 17:01:45 +01:00
parent 42d2c20ce3
commit bfe65b0216
278 changed files with 119 additions and 34 deletions

View File

@ -83,8 +83,10 @@
if(el.href === location.href) el.classList.add("active");
else el.classList.remove("active")
})
</script>
{% if _p.ip_location_api.is_some() %}
<script>const IP_LOCATION_API = "{{ _p.ip_location_api.unwrap() }}"</script>
{% endif %}
<script src="/assets/js/ip_location_service.js"></script>
</body>
</html>

View File

@ -44,6 +44,7 @@
<thead>
<tr>
<th scope="col">IP address</th>
<th scope="col">Location</th>
<th scope="col">Date</th>
<th scope="col">Bypass 2FA</th>
</tr>
@ -52,6 +53,7 @@
{% for e in user.get_formatted_2fa_successful_logins() %}
<tr>
<td>{{ e.ip }}</td>
<td><locateip ip="{{ e.ip }}"></locateip></td>
<td>{{ e.fmt_time() }}</td>
<td>{% if e.can_bypass_2fa %}YES{% else %}NO{% endif %}</td>
</tr>