From 6e46124c94ed40ae68f70aca6eea280477444b2b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 24 Mar 2021 21:40:08 +0100 Subject: [PATCH] web/admin/user: fix user source connection lookups Signed-off-by: Jens Langhammer --- authentik/sources/oauth/api/source_connection.py | 2 +- swagger.yaml | 2 +- web/src/pages/users/settings/SourceSettingsOAuth.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/authentik/sources/oauth/api/source_connection.py b/authentik/sources/oauth/api/source_connection.py index bab90cf86..67d34db3b 100644 --- a/authentik/sources/oauth/api/source_connection.py +++ b/authentik/sources/oauth/api/source_connection.py @@ -23,7 +23,7 @@ class UserOAuthSourceConnectionViewSet(ModelViewSet): queryset = UserOAuthSourceConnection.objects.all() serializer_class = UserOAuthSourceConnectionSerializer - filterset_fields = ["source"] + filterset_fields = ["source__slug"] def get_queryset(self): if not self.request: diff --git a/swagger.yaml b/swagger.yaml index 7272898d7..da9fcb68f 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -7415,7 +7415,7 @@ paths: operationId: sources_oauth_user_connections_list description: Source Viewset parameters: - - name: source + - name: source__slug in: query description: '' required: false diff --git a/web/src/pages/users/settings/SourceSettingsOAuth.ts b/web/src/pages/users/settings/SourceSettingsOAuth.ts index 383c1a7f5..94fad46e9 100644 --- a/web/src/pages/users/settings/SourceSettingsOAuth.ts +++ b/web/src/pages/users/settings/SourceSettingsOAuth.ts @@ -26,7 +26,7 @@ export class SourceSettingsOAuth extends BaseUserSettings { renderInner(source: OAuthSource): TemplateResult { return html`${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsList({ - source: this.objectId + sourceSlug: this.objectId }).then((connection) => { if (connection.results.length > 0) { return html`

${gettext("Connected.")}