From d1a1bfbbc5bc634b589f38116b3d62d47be8ab07 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 5 Oct 2021 11:11:34 +0200 Subject: [PATCH] web/user: don't show managed tokens in user interface Signed-off-by: Jens Langhammer --- authentik/core/api/tokens.py | 1 + schema.yml | 4 ++++ web/src/user/user-settings/tokens/UserTokenList.ts | 1 + 3 files changed, 6 insertions(+) diff --git a/authentik/core/api/tokens.py b/authentik/core/api/tokens.py index 24c5b76e7..d246629e6 100644 --- a/authentik/core/api/tokens.py +++ b/authentik/core/api/tokens.py @@ -82,6 +82,7 @@ class TokenViewSet(UsedByMixin, ModelViewSet): "description", "expires", "expiring", + "managed", ] ordering = ["identifier", "expires"] permission_classes = [OwnerSuperuserPermissions] diff --git a/schema.yml b/schema.yml index 9aba2a107..371eae18e 100644 --- a/schema.yml +++ b/schema.yml @@ -2318,6 +2318,10 @@ paths: - app_password - recovery - verification + - in: query + name: managed + schema: + type: string - name: ordering required: false in: query diff --git a/web/src/user/user-settings/tokens/UserTokenList.ts b/web/src/user/user-settings/tokens/UserTokenList.ts index 69274be45..99b699910 100644 --- a/web/src/user/user-settings/tokens/UserTokenList.ts +++ b/web/src/user/user-settings/tokens/UserTokenList.ts @@ -37,6 +37,7 @@ export class UserTokenList extends Table { page: page, pageSize: PAGE_SIZE, search: this.search || "", + managed: "", }); }