web: backport fix impersonate api (#12184)

web/admin: fix impersonate API call

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2024-11-25 17:04:56 +01:00
committed by GitHub
parent d9fbe1d467
commit efac5ce7bd
3 changed files with 3 additions and 0 deletions

View File

@ -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 = "/";

View File

@ -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 = "/";

View File

@ -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 = "/";