Show tokens for admins

This commit is contained in:
Johannes Zellner
2016-06-07 14:07:41 +02:00
parent 8602e033c5
commit 89cef4f050
2 changed files with 15 additions and 3 deletions

View File

@@ -229,16 +229,23 @@
<div class="row">
<div class="col-xs-12">
<b>{{ client.activeTokens.length }}</b> tokens are active for this application.
<button class="btn btn-xs btn-danger pull-right" ng-click="removeAccessTokens(client)" ng-disabled="!client.activeTokens.length || client.busy"><i class="fa fa-spinner fa-pulse" ng-show="client.busy"></i> Revoke access</button>
<button class="btn btn-xs btn-default pull-right" ng-click="removeAccessTokens(client)" ng-disabled="!client.activeTokens.length || client.busy"><i class="fa fa-spinner fa-pulse" ng-show="client.busy"></i> Revoke access</button>
<br/>
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse{{client.id}}" ng-show="user.admin">Advanced</a>
<div id="collapse{{client.id}}" class="panel-collapse collapse">
<div class="panel-body">
<h4 class="text-muted">Credentials</h4>
<hr/>
<h4 class="text-muted">Credentials <button class="btn btn-xs btn-danger pull-right" ng-click="clientRemove.show(client)" title="Remove API Client" ng-show="client.location === 'external'">Remove API Client</button></h4>
<p>Scope: <b>{{ client.scope }}</b></p>
<p>Client ID: <b>{{ client.id }}</b></p>
<p ng-show="client.clientSecret">Client Secret: <b>{{ client.clientSecret }}</b></p>
<button class="btn btn-xs btn-danger pull-right" ng-click="clientRemove.show(client)" title="Remove API Client" ng-show="client.location === 'external'"><i class="fa fa-trash-o"></i> Remove API Client</button>
<hr/>
<h4 class="text-muted">Your Tokens</h4>
<p ng-repeat="token in client.activeTokens">
<token>{{ token.accessToken }}</token> <button class="btn btn-xs btn-danger pull-right" ng-click="" title="Revoke Token"><i class="fa fa-trash-o"></i></button>
</p>
</div>
</div>
</div>