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;