mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Remove userkey references
This commit is contained in:
parent
8e2a7882e7
commit
4a0942ab4a
@ -12,7 +12,6 @@
|
||||
<a class="nav-link nav-item text-start{% if active_tab == 'change-password' %} active{% endif %}" href="{% url 'user:change_password' %}">Change Password</a>
|
||||
{% endif %}
|
||||
<a class="nav-link nav-item text-start{% if active_tab == 'api-tokens' %} active{% endif %}" href="{% url 'user:token_list' %}">API Tokens</a>
|
||||
<a class="nav-link nav-item text-start{% if active_tab == 'userkey' %} active{% endif %}" href="{% url 'user:userkey' %}">User Key</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-sm-9 col-md-8 px-4">
|
||||
|
@ -1,5 +0,0 @@
|
||||
{% extends 'generic/object_delete.html' %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete your session key?</p>
|
||||
{% endblock %}
|
@ -1,53 +0,0 @@
|
||||
{% extends 'users/base.html' %}
|
||||
|
||||
{% block title %}User Key{% endblock %}
|
||||
|
||||
{% block usercontent %}
|
||||
{% if object %}
|
||||
<div class="float-end noprint">
|
||||
<a href="{% url 'user:userkey_edit' %}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span>
|
||||
Edit User Key
|
||||
</a>
|
||||
</div>
|
||||
<h4>
|
||||
Your User Key is
|
||||
{% if object.is_active %}
|
||||
<span class="badge bg-success">Active</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">Inactive</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
<p>
|
||||
<small class="text-muted">Created {{ object.created }} · Updated <span title="{{ object.last_updated }}">{{ object.last_updated|timesince }}</span> ago</small>
|
||||
</p>
|
||||
{% if not object.is_active %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<i class="mdi mdi-alert"></i>
|
||||
Your user key is inactive. Ask an administrator to enable it for you.
|
||||
</div>
|
||||
{% endif %}
|
||||
<pre class="copyable">{{ object.public_key }}</pre>
|
||||
<hr />
|
||||
{% if object.session_key %}
|
||||
<div class="float-end noprint">
|
||||
<a href="{% url 'user:sessionkey_delete' %}" class="btn btn-danger">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>
|
||||
Delete Session Key
|
||||
</a>
|
||||
</div>
|
||||
<h4>Session Key: <span class="badge bg-success">Active</span></h4>
|
||||
<small class="text-muted">Created {{ object.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>
|
||||
<a href="{% url 'user:userkey_edit' %}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Create a User Key
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
@ -1,55 +0,0 @@
|
||||
{% extends 'users/base.html' %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}User Key{% endblock %}
|
||||
|
||||
{% block usercontent %}
|
||||
{% if object.is_active %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>Warning:</strong> Changing your public key will require your user key to be re-activated by another
|
||||
user. You will be unable to retrieve any secrets until your key has been reactivated.
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="." method="post" class="form">
|
||||
{% csrf_token %}
|
||||
<div class="field-group">
|
||||
{% render_field form.public_key %}
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-4 text-start">
|
||||
<button type="button" class="btn btn-info" id="generate_keypair" data-bs-toggle="modal" data-bs-target="#new_keypair_modal">Generate a New Key Pair</button>
|
||||
</div>
|
||||
<div class="col-8 text-end">
|
||||
<a href="{% url 'user:userkey' %}" class="btn btn-outline-danger">Cancel</a>
|
||||
<button type="submit" name="_update" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal fade" id="new_keypair_modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="new_keypair_modal_title">
|
||||
New RSA Key Pair
|
||||
</h4>
|
||||
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="field-group">
|
||||
<h5>New Public Key</h5>
|
||||
<textarea class="form-control" rows="10" id="new_pubkey" style="height: 250px;font-family:var(--bs-font-monospace);"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="field-group">
|
||||
<h5>New Private Key</h5>
|
||||
<textarea class="form-control" rows="10" id="new_privkey" style="height: 250px;font-family:var(--bs-font-monospace);"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer text-center">
|
||||
<button type="button" class="btn btn-danger" id="use_new_pubkey" data-bs-dismiss="modal">I Saved My New Private Key</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user