web/user: filter tokens by username

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-02-02 11:00:31 +01:00
parent 2113029a14
commit 095cb75d6c
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import { IntentToLabel } from "@goauthentik/admin/tokens/TokenListPage"; import { IntentToLabel } from "@goauthentik/admin/tokens/TokenListPage";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { uiConfig } from "@goauthentik/common/ui/config"; import { uiConfig } from "@goauthentik/common/ui/config";
import { me } from "@goauthentik/common/users";
import { PFColor } from "@goauthentik/elements/Label"; import { PFColor } from "@goauthentik/elements/Label";
import "@goauthentik/elements/buttons/Dropdown"; import "@goauthentik/elements/buttons/Dropdown";
import "@goauthentik/elements/buttons/ModalButton"; import "@goauthentik/elements/buttons/ModalButton";
@ -39,6 +40,9 @@ export class UserTokenList extends Table<Token> {
pageSize: (await uiConfig()).pagination.perPage, pageSize: (await uiConfig()).pagination.perPage,
search: this.search || "", search: this.search || "",
managed: "", managed: "",
// The user might have access to other tokens that aren't for their user
// but only show tokens for their user here
userUsername: (await me()).user.username,
}); });
} }