core: hide token value by default

This commit is contained in:
Jens Langhammer 2020-10-05 22:40:30 +02:00
parent 2406a619df
commit ac88bd5d44
3 changed files with 4 additions and 5 deletions

View file

@ -25,7 +25,7 @@
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
<thead>
<tr role="row">
<th role="columnheader" scope="col">{% trans 'Token' %}</th>
<th role="columnheader" scope="col">{% trans 'Identifier' %}</th>
<th role="columnheader" scope="col">{% trans 'User' %}</th>
<th role="columnheader" scope="col">{% trans 'Expires?' %}</th>
<th role="columnheader" scope="col">{% trans 'Expiry Date' %}</th>
@ -36,9 +36,7 @@
{% for token in object_list %}
<tr role="row">
<th role="columnheader">
<div>
<div>{{ token.pk.hex }}</div>
</div>
<div>{{ token.identifier }}</div>
</th>
<td role="cell">
<span>

View file

@ -27,6 +27,7 @@ class TokenListView(
ordering = "expires"
template_name = "administration/token/list.html"
search_fields = [
"identifier",
"intent",
"user__username",
"description",

View file

@ -314,7 +314,7 @@ class Token(ExpiringModel):
def __str__(self):
return (
f"Token {self.token_uuid.hex} {self.description} (expires={self.expires})"
f"Token {self.identifier} (expires={self.expires})"
)
class Meta: