Only show active clients for non-admins

This commit is contained in:
Johannes Zellner
2016-06-07 13:46:45 +02:00
parent 3598d89b12
commit 8602e033c5
2 changed files with 7 additions and 1 deletions

View File

@@ -94,6 +94,12 @@ app.filter('installSuccess', function () {
};
});
app.filter('activeOAuthClients', function () {
return function (clients, user) {
return clients.filter(function (c) { return user.admin || (c.activeTokens && c.activeTokens.length > 0); });
};
});
app.filter('installationActive', function () {
return function(app) {
if (app.installationState === ISTATES.ERROR) return false;

View File

@@ -215,7 +215,7 @@
<br/>
<!-- we will always at least have the webadmin token here, so activeClients always will have one entry with at least one token -->
<div class="card" ng-repeat="client in activeClients">
<div class="card" ng-repeat="client in activeClients | activeOAuthClients:user">
<div class="grid-item-top">
<div class="row">
<div class="col-xs-12">