mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-23 14:49:31 +00:00
Add the ability to view IP addresses in auth, with a basic search interface
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
{% if "hr"|installed %}
|
||||
<li><b>Blacklist Status: {% if blacklisted %}<font color='red'>BLACKLISTED</font> ({{ blacklisted }} items){% else %}<font color='geen'>OK</font>{% endif %}</b></li>
|
||||
{% endif %}
|
||||
{% if user.ip_addresses.count %}
|
||||
<li><a href="{% url sso-ipaddress %}?user={{ user.username }}">IP Address Lookup</a> ({{ user.ip_addresses.count }} associated addresses)</li>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
25
app/sso/templates/sso/ssouseripaddress_list.html
Normal file
25
app/sso/templates/sso/ssouseripaddress_list.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}IP Search: {% if kuser %}{{ kuser }}{% else %}{{ ip }}{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>IP Search: {% if kuser %}{{ kuser }}{% else %}{{ ip }}{% endif %}</h1>
|
||||
|
||||
{% if object_list %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>IP Address</th><th>User</th><th>First Use</th><th>Last Use</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr><td><a href="{% url sso-ipaddress %}?ip={{ object.ip_address }}">{{ object.ip_address }}</a></td>
|
||||
<td><a href="{% url sso-ipaddress %}?user={{ object.user.username }}">{{ object.user }}</a> (<a href="{% url sso-viewuser object.user.username %}">Profile</a>)</td>
|
||||
<td>{{ object.first_seen }}</td>
|
||||
<td>{{ object.last_seen }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user