mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-17 08:20:16 +02:00
rename revoke to delete to be clearer
This commit is contained in:
parent
6b8341ab5a
commit
90ad7790e1
@ -9,9 +9,9 @@
|
||||
<table class="table table-aa" id="table_tokens" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Scopes</th>
|
||||
<th class="text-right">Actions</th>
|
||||
<th>Character</th>
|
||||
<th>{% translate "Scoes" %}</th>
|
||||
<th class="text-right">{% translate "Actions" %}</th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@ -19,7 +19,7 @@
|
||||
{% for t in tokens %}
|
||||
<tr>
|
||||
<td styl="white-space:initial;">{% for s in t.scopes.all %}<span class="label label-default">{{s.name}}</span> {% endfor %}</td>
|
||||
<td class="text-right"><a href="{% url 'authentication:token_revoke' t.id %}" class="btn btn-danger"><i class="fas fa-trash"></i></a> <a href="{% url 'authentication:token_refresh' t.id %}" class="btn btn-success"><i class="fas fa-sync-alt"></i></a></td>
|
||||
<td class="text-right"><a href="{% url 'authentication:token_delete' t.id %}" class="btn btn-danger"><i class="fas fa-trash"></i></a> <a href="{% url 'authentication:token_refresh' t.id %}" class="btn btn-success"><i class="fas fa-sync-alt"></i></a></td>
|
||||
<td>{{t.character_name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -28,9 +28,9 @@ urlpatterns = [
|
||||
name='token_management'
|
||||
),
|
||||
path(
|
||||
'account/tokens/revoke/<int:token_id>',
|
||||
views.token_revoke,
|
||||
name='token_revoke'
|
||||
'account/tokens/delete/<int:token_id>',
|
||||
views.token_delete,
|
||||
name='token_delete'
|
||||
),
|
||||
path(
|
||||
'account/tokens/refresh/<int:token_id>',
|
||||
|
@ -1,6 +1,4 @@
|
||||
from glob import escape
|
||||
import logging
|
||||
from symbol import except_clause
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
@ -73,7 +71,7 @@ def token_management(request):
|
||||
return render(request, 'authentication/tokens.html', context)
|
||||
|
||||
@login_required
|
||||
def token_revoke(request, token_id=None):
|
||||
def token_delete(request, token_id=None):
|
||||
try:
|
||||
token = Token.objects.get(id=token_id)
|
||||
if request.user == token.user:
|
||||
|
Loading…
x
Reference in New Issue
Block a user