diff --git a/authentik/outposts/api/outposts.py b/authentik/outposts/api/outposts.py index db9b08ce9..9ab0ae326 100644 --- a/authentik/outposts/api/outposts.py +++ b/authentik/outposts/api/outposts.py @@ -16,7 +16,7 @@ class OutpostSerializer(ModelSerializer): """Outpost Serializer""" _config = JSONField() - providers = ProviderSerializer(many=True, read_only=True) + providers_obj = ProviderSerializer(source="providers", many=True, read_only=True) class Meta: @@ -25,6 +25,7 @@ class OutpostSerializer(ModelSerializer): "pk", "name", "providers", + "providers_obj", "service_connection", "token_identifier", "_config", diff --git a/swagger.yaml b/swagger.yaml index 75b1575e3..1bfcdb6ec 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -8159,6 +8159,7 @@ definitions: description: Outpost Serializer required: - name + - providers - _config type: object properties: @@ -8172,6 +8173,11 @@ definitions: type: string minLength: 1 providers: + type: array + items: + type: integer + uniqueItems: true + providers_obj: description: '' type: array items: diff --git a/web/src/api/Outposts.ts b/web/src/api/Outposts.ts index 53a172769..9205b8911 100644 --- a/web/src/api/Outposts.ts +++ b/web/src/api/Outposts.ts @@ -12,7 +12,8 @@ export class Outpost { pk: string; name: string; - providers: Provider[]; + providers: number[]; + providers_obj: Provider[]; service_connection?: string; _config: QueryArguments; token_identifier: string; diff --git a/web/src/pages/outposts/OutpostListPage.ts b/web/src/pages/outposts/OutpostListPage.ts index ab30ec8f9..59b0a9250 100644 --- a/web/src/pages/outposts/OutpostListPage.ts +++ b/web/src/pages/outposts/OutpostListPage.ts @@ -46,7 +46,7 @@ export class OutpostListPage extends TablePage { row(item: Outpost): TemplateResult[] { return [ html`${item.name}`, - html`