web: backport fix impersonate api (cherry-pick #12184) (#12185)

web: backport fix impersonate api (#12184)

web/admin: fix impersonate API call

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L. <jens@goauthentik.io>
This commit is contained in:
gcp-cherry-pick-bot[bot]
2024-11-25 17:05:32 +01:00
committed by GitHub
parent 8ab8090b60
commit c6ec83aab2
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 = "/";