mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
13044 honor allow_token_retreival
This commit is contained in:
parent
c018cd8864
commit
a771061c45
@ -3,7 +3,7 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
{% block title %}{% trans "User" %} {{ object.key }}{% endblock %}
|
{% block title %}{% trans "Token" %} {{ object }}{% endblock %}
|
||||||
|
|
||||||
{% block subtitle %}{% endblock %}
|
{% block subtitle %}{% endblock %}
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Key" %}</th>
|
<th scope="row">{% trans "Key" %}</th>
|
||||||
<td>{{ object.key }}</td>
|
<td>{{ object }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "User" %}</th>
|
<th scope="row">{% trans "User" %}</th>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from django.conf import settings
|
||||||
import django_tables2 as tables
|
import django_tables2 as tables
|
||||||
|
|
||||||
from netbox.tables import NetBoxTable, columns
|
from netbox.tables import NetBoxTable, columns
|
||||||
@ -59,7 +60,6 @@ class TokenTable(NetBoxTable):
|
|||||||
class UserTokenTable(NetBoxTable):
|
class UserTokenTable(NetBoxTable):
|
||||||
key = columns.TemplateColumn(
|
key = columns.TemplateColumn(
|
||||||
template_code=TOKEN,
|
template_code=TOKEN,
|
||||||
linkify=True,
|
|
||||||
)
|
)
|
||||||
write_enabled = columns.BooleanColumn(
|
write_enabled = columns.BooleanColumn(
|
||||||
verbose_name='Write'
|
verbose_name='Write'
|
||||||
@ -77,9 +77,9 @@ class UserTokenTable(NetBoxTable):
|
|||||||
|
|
||||||
class Meta(NetBoxTable.Meta):
|
class Meta(NetBoxTable.Meta):
|
||||||
model = UserToken
|
model = UserToken
|
||||||
fields = (
|
fields = [
|
||||||
'pk', 'key', 'user', 'description', 'write_enabled', 'created', 'expires', 'last_used', 'allowed_ips',
|
'pk', 'id', 'key', 'user', 'description', 'write_enabled', 'created', 'expires', 'last_used', 'allowed_ips',
|
||||||
)
|
]
|
||||||
|
|
||||||
|
|
||||||
class UserTable(NetBoxTable):
|
class UserTable(NetBoxTable):
|
||||||
|
Loading…
Reference in New Issue
Block a user