Show api token scope in listing

This commit is contained in:
Johannes Zellner
2022-09-24 21:27:12 +02:00
parent 1de19b1092
commit ae34afe4cb

View File

@@ -484,8 +484,9 @@
<table class="table table-hover" style="margin: 0;">
<thead>
<tr>
<th style="width: 45%">{{ 'profile.apiTokens.name' | tr }}</th>
<th style="width: 45%">{{ 'profile.apiTokens.lastUsed' | tr }}</th>
<th style="width: 35%">{{ 'profile.apiTokens.name' | tr }}</th>
<th style="width: 35%">{{ 'profile.apiTokens.lastUsed' | tr }}</th>
<th style="width: 20%">{{ 'profile.apiTokens.scope' | tr }}</th>
<th style="width: 10%" class="text-right">{{ 'main.actions' | tr }}</th>
</tr>
</thead>
@@ -501,6 +502,10 @@
<span ng-show="token.lastUsedTime">{{ token.lastUsedTime | prettyLongDate }}</span>
<span ng-show="!token.lastUsedTime">{{ 'profile.apiTokens.neverUsed' | tr }}</span>
</td>
<td>
<span ng-show="token.scope['*'] === 'rw'">Read+Write</span>
<span ng-hide="token.scope['*'] === 'rw'">Read</span>
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-danger" ng-click="tokens.revokeToken(token)" uib-tooltip="{{ 'profile.apiTokens.revokeTokenTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>
</td>