Only show active clients for non-admins
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user