From 4b22e3e0a8463b4e4890d149f7095ab370332727 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 14 May 2019 16:55:29 +0200 Subject: [PATCH] Hide the token, session and oauch client ui for non admins --- src/views/account.html | 8 ++++---- src/views/account.js | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/account.html b/src/views/account.html index bb425ebeb..077d3679a 100644 --- a/src/views/account.html +++ b/src/views/account.html @@ -289,12 +289,12 @@
-
+

API Tokens

-
+
@@ -324,11 +324,11 @@
-
+

Sessions

-
+
diff --git a/src/views/account.js b/src/views/account.js index 2af51c42b..79e9395e8 100644 --- a/src/views/account.js +++ b/src/views/account.js @@ -382,6 +382,8 @@ angular.module('Application').controller('AccountController', ['$scope', 'Client } Client.onReady(function () { + if (!Client.getUserInfo().admin) return; + Client.getOAuthClients(function (error, activeClients) { if (error) return console.error(error);