iports/ilot/authentik/12184_fix-impersonnate-api.patch

48 lines
2.6 KiB
Diff

From 7b88a0ba662a05076ee209f4b21caf9bed972b6a Mon Sep 17 00:00:00 2001
From: Jens Langhammer <jens@goauthentik.io>
Date: Mon, 25 Nov 2024 16:48:40 +0100
Subject: [PATCH] web/admin: fix impersonate API call
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---
web/src/admin/groups/RelatedUserList.ts | 1 +
web/src/admin/users/UserListPage.ts | 1 +
web/src/admin/users/UserViewPage.ts | 1 +
3 files changed, 3 insertions(+)
diff --git a/web/src/admin/groups/RelatedUserList.ts b/web/src/admin/groups/RelatedUserList.ts
index 72a9b62a1856..80474f5938e8 100644
--- a/web/src/admin/groups/RelatedUserList.ts
+++ b/web/src/admin/groups/RelatedUserList.ts
@@ -219,6 +219,7 @@ export class RelatedUserList extends WithBrandConfig(WithCapabilitiesConfig(Tabl
return new CoreApi(DEFAULT_CONFIG)
.coreUsersImpersonateCreate({
id: item.pk,
+ impersonationRequest: { reason: "" },
})
.then(() => {
window.location.href = "/";
diff --git a/web/src/admin/users/UserListPage.ts b/web/src/admin/users/UserListPage.ts
index 1264c00814fc..6b0f19a42e88 100644
--- a/web/src/admin/users/UserListPage.ts
+++ b/web/src/admin/users/UserListPage.ts
@@ -272,6 +272,7 @@ export class UserListPage extends WithBrandConfig(WithCapabilitiesConfig(TablePa
return new CoreApi(DEFAULT_CONFIG)
.coreUsersImpersonateCreate({
id: item.pk,
+ impersonationRequest: { reason: "" },
})
.then(() => {
window.location.href = "/";
diff --git a/web/src/admin/users/UserViewPage.ts b/web/src/admin/users/UserViewPage.ts
index 119ffdb3716a..83e2661e6294 100644
--- a/web/src/admin/users/UserViewPage.ts
+++ b/web/src/admin/users/UserViewPage.ts
@@ -215,6 +215,7 @@ export class UserViewPage extends WithCapabilitiesConfig(AKElement) {
return new CoreApi(DEFAULT_CONFIG)
.coreUsersImpersonateCreate({
id: user.pk,
+ impersonationRequest: { reason: "" },
})
.then(() => {
window.location.href = "/";