From 352223f35ed7225214acdd318ca0d714d19814d5 Mon Sep 17 00:00:00 2001 From: "Jens L." Date: Fri, 18 Oct 2024 19:12:37 +0200 Subject: [PATCH] web/admin: fix sync single button throwing error (#11727) Signed-off-by: Jens Langhammer --- .../GoogleWorkspaceProviderGroupList.ts | 14 +++++++++++--- .../GoogleWorkspaceProviderUserList.ts | 14 +++++++++++--- .../MicrosoftEntraProviderGroupList.ts | 14 +++++++++++--- .../MicrosoftEntraProviderUserList.ts | 14 +++++++++++--- .../admin/providers/scim/SCIMProviderGroupList.ts | 11 +++++++++-- .../admin/providers/scim/SCIMProviderUserList.ts | 11 +++++++++-- 6 files changed, 62 insertions(+), 16 deletions(-) diff --git a/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderGroupList.ts b/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderGroupList.ts index d704ca87f3c7..7c5dc6fe271b 100644 --- a/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderGroupList.ts +++ b/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderGroupList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { GoogleWorkspaceProviderGroup, ProvidersApi, SyncObjectModelEnum } from "@goauthentik/api"; +import { + GoogleWorkspaceProviderGroup, + ProvidersApi, + ProvidersGoogleWorkspaceSyncObjectCreateRequest, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-google-workspace-groups-list") export class GoogleWorkspaceProviderGroupList extends Table { @@ -31,8 +36,11 @@ export class GoogleWorkspaceProviderGroupList extends Table { + return new ProvidersApi( + DEFAULT_CONFIG, + ).providersGoogleWorkspaceSyncObjectCreate(data); + }} slot="form" > diff --git a/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderUserList.ts b/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderUserList.ts index 1f58b96cc5bd..c0e125ff22db 100644 --- a/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderUserList.ts +++ b/web/src/admin/providers/google_workspace/GoogleWorkspaceProviderUserList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { GoogleWorkspaceProviderUser, ProvidersApi, SyncObjectModelEnum } from "@goauthentik/api"; +import { + GoogleWorkspaceProviderUser, + ProvidersApi, + ProvidersGoogleWorkspaceSyncObjectCreateRequest, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-google-workspace-users-list") export class GoogleWorkspaceProviderUserList extends Table { @@ -31,8 +36,11 @@ export class GoogleWorkspaceProviderUserList extends Table { + return new ProvidersApi( + DEFAULT_CONFIG, + ).providersGoogleWorkspaceSyncObjectCreate(data); + }} slot="form" > diff --git a/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderGroupList.ts b/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderGroupList.ts index 3bd78041d212..79056978d6f0 100644 --- a/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderGroupList.ts +++ b/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderGroupList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { MicrosoftEntraProviderGroup, ProvidersApi, SyncObjectModelEnum } from "@goauthentik/api"; +import { + MicrosoftEntraProviderGroup, + ProvidersApi, + ProvidersMicrosoftEntraSyncObjectCreateRequest, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-microsoft-entra-groups-list") export class MicrosoftEntraProviderGroupList extends Table { @@ -28,8 +33,11 @@ export class MicrosoftEntraProviderGroupList extends Table { + return new ProvidersApi( + DEFAULT_CONFIG, + ).providersMicrosoftEntraSyncObjectCreate(data); + }} slot="form" > diff --git a/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderUserList.ts b/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderUserList.ts index 8efcd07d9687..6ff8d4c7253a 100644 --- a/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderUserList.ts +++ b/web/src/admin/providers/microsoft_entra/MicrosoftEntraProviderUserList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { MicrosoftEntraProviderUser, ProvidersApi, SyncObjectModelEnum } from "@goauthentik/api"; +import { + MicrosoftEntraProviderUser, + ProvidersApi, + ProvidersMicrosoftEntraSyncObjectCreateRequest, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-microsoft-entra-users-list") export class MicrosoftEntraProviderUserList extends Table { @@ -31,8 +36,11 @@ export class MicrosoftEntraProviderUserList extends Table { + return new ProvidersApi( + DEFAULT_CONFIG, + ).providersMicrosoftEntraSyncObjectCreate(data); + }} slot="form" > diff --git a/web/src/admin/providers/scim/SCIMProviderGroupList.ts b/web/src/admin/providers/scim/SCIMProviderGroupList.ts index ca67b67823f0..a2c8e13d50a3 100644 --- a/web/src/admin/providers/scim/SCIMProviderGroupList.ts +++ b/web/src/admin/providers/scim/SCIMProviderGroupList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { ProvidersApi, SCIMProviderGroup, SyncObjectModelEnum } from "@goauthentik/api"; +import { + ProvidersApi, + ProvidersScimSyncObjectCreateRequest, + SCIMProviderGroup, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-scim-groups-list") export class SCIMProviderGroupList extends Table { @@ -29,7 +34,9 @@ export class SCIMProviderGroupList extends Table { { + return new ProvidersApi(DEFAULT_CONFIG).providersScimSyncObjectCreate(data); + }} slot="form" > diff --git a/web/src/admin/providers/scim/SCIMProviderUserList.ts b/web/src/admin/providers/scim/SCIMProviderUserList.ts index 9af954d2402e..c5044966dec4 100644 --- a/web/src/admin/providers/scim/SCIMProviderUserList.ts +++ b/web/src/admin/providers/scim/SCIMProviderUserList.ts @@ -8,7 +8,12 @@ import { msg } from "@lit/localize"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; -import { ProvidersApi, SCIMProviderUser, SyncObjectModelEnum } from "@goauthentik/api"; +import { + ProvidersApi, + ProvidersScimSyncObjectCreateRequest, + SCIMProviderUser, + SyncObjectModelEnum, +} from "@goauthentik/api"; @customElement("ak-provider-scim-users-list") export class SCIMProviderUserList extends Table { @@ -29,7 +34,9 @@ export class SCIMProviderUserList extends Table { { + return new ProvidersApi(DEFAULT_CONFIG).providersScimSyncObjectCreate(data); + }} slot="form" >