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:
@ -219,6 +219,7 @@ export class RelatedUserList extends WithBrandConfig(WithCapabilitiesConfig(Tabl
|
|||||||
return new CoreApi(DEFAULT_CONFIG)
|
return new CoreApi(DEFAULT_CONFIG)
|
||||||
.coreUsersImpersonateCreate({
|
.coreUsersImpersonateCreate({
|
||||||
id: item.pk,
|
id: item.pk,
|
||||||
|
impersonationRequest: { reason: "" },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
|||||||
@ -272,6 +272,7 @@ export class UserListPage extends WithBrandConfig(WithCapabilitiesConfig(TablePa
|
|||||||
return new CoreApi(DEFAULT_CONFIG)
|
return new CoreApi(DEFAULT_CONFIG)
|
||||||
.coreUsersImpersonateCreate({
|
.coreUsersImpersonateCreate({
|
||||||
id: item.pk,
|
id: item.pk,
|
||||||
|
impersonationRequest: { reason: "" },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
|||||||
@ -215,6 +215,7 @@ export class UserViewPage extends WithCapabilitiesConfig(AKElement) {
|
|||||||
return new CoreApi(DEFAULT_CONFIG)
|
return new CoreApi(DEFAULT_CONFIG)
|
||||||
.coreUsersImpersonateCreate({
|
.coreUsersImpersonateCreate({
|
||||||
id: user.pk,
|
id: user.pk,
|
||||||
|
impersonationRequest: { reason: "" },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
|||||||
Reference in New Issue
Block a user