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:
![98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
8ab8090b60
commit
c6ec83aab2
@ -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