mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Relate SessionKey to UserKey rather than User
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
|
||||
{% block usercontent %}
|
||||
{% if userkey %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'user:userkey_edit' %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span>
|
||||
Edit user key
|
||||
</a>
|
||||
</div>
|
||||
<h4>
|
||||
Your user key is:
|
||||
{% if userkey.is_active %}
|
||||
@@ -12,15 +18,21 @@
|
||||
<span class="label label-danger">Inactive</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
<p>Your public key is below.</p>
|
||||
<pre>{{ userkey.public_key }}</pre>
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'user:userkey_edit' %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span>
|
||||
Edit user key
|
||||
</a>
|
||||
</div>
|
||||
{% include 'inc/created_updated.html' with obj=userkey %}
|
||||
<pre>{{ userkey.public_key }}</pre>
|
||||
<hr />
|
||||
{% if userkey.session_key %}
|
||||
<div class="pull-right">
|
||||
<a href="#" class="btn btn-danger">
|
||||
<span class="fa fa-trash" aria-hidden="true"></span>
|
||||
Delete session key
|
||||
</a>
|
||||
</div>
|
||||
<h4>Session key: <span class="label label-success">Active</span></h4>
|
||||
<small class="text-muted">Created {{ userkey.session_key.created }}</small>
|
||||
{% else %}
|
||||
<h4>No active session key</h4>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>You don't have a user key on file.</p>
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user