mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
101 lines
2.5 KiB
HTML
101 lines
2.5 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% load naturaltimediff %}
|
|
{% load installed %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>{{user.username}}'s Profile</h1>
|
|
|
|
<b>Username:</b> {{ user.username }}<br/>
|
|
<b>Email:</b> {{ user.email }}<br/>
|
|
<b>Groups:</b> {{ user.groups.all|join:", " }}<br/>
|
|
<a href="{% url sso.views.refresh_access user.id %}">Update Access</a><br/>
|
|
|
|
{% if is_admin %}
|
|
<br/>
|
|
<h2>Service Accounts</h2>
|
|
{% if services %}
|
|
<table>
|
|
<tr><th>Service</th><th>Username</th><th>Active</th></tr>
|
|
{% for acc in services %}
|
|
<tr><td>{{ acc.service }}</td>
|
|
<td>{{ acc.service_uid }}</td>
|
|
<td>{% if acc.active %}Yes{% else %}No{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
<br/>
|
|
{% if user.application_set.all %}
|
|
<h2>Applications</h2>
|
|
<table>
|
|
<tr><th>ID</th><th>Character</th><th>Applied To</th><th>Status</th></tr>
|
|
{% for app in user.application_set.all %}
|
|
<tr><td><a href="{% url hr.views.view_application app.id %}">{{ app.id }}</a></td>
|
|
<td>{{ app.character }}</td>
|
|
<td>{{ app.corporation }}</td>
|
|
<td>{{ app.get_status_display }}</td></tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
<br/>
|
|
<h2>Eve API Keys</h2>
|
|
{% if user.eveaccount_set.all %}
|
|
<table>
|
|
<thead>
|
|
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for acc in user.eveaccount_set.all %}
|
|
<tr><td>{{ acc.api_user_id }}</td>
|
|
<td>{{ acc.api_key }}</td>
|
|
<td>{{ acc.description }}</td>
|
|
<td>{{ acc.get_api_keytype_display }}</td>
|
|
<td>{{ acc.get_api_status_display }}</td>
|
|
<td>{{ acc.api_last_updated|naturaltimediff }}</td>
|
|
</tr>
|
|
</tbody>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
<br/>
|
|
{% if user.eveaccount_set.all %}
|
|
<table>
|
|
<tr><th>Character Name</th><th>Corp</th></tr>
|
|
{% for acc in user.eveaccount_set.all %}
|
|
<tr><th colspan=2>Account {{ acc.api_user_id }}</th></tr>
|
|
{% for char in acc.characters.all %}
|
|
<tr><td><a href="{% url eve_api.views.eveapi_character char.id %}">{{ char.name }}</a></td>
|
|
<td>{{ char.corporation }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if "reddit"|installed %}
|
|
<br/>
|
|
<h2>Reddit Accounts</h2>
|
|
{% if user.redditaccount_set.all %}
|
|
<table>
|
|
<thead>
|
|
<tr><th>Username</th><th>Created Date</th><th>Validated</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for acc in user.redditaccount_set.all %}
|
|
<tr><td><a href="http://reddit.com/user/{{ acc.username }}/">{{ acc.username }}</a></td>
|
|
<td>{{ acc.date_created }}</td>
|
|
<td>{% if acc.validated %}Yes{% else %}No{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endblock %}
|