From 4c5537ddfec97021349930f48a2b9c2a03571499 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 18 Dec 2021 15:33:46 +0100 Subject: [PATCH] sources/oauth: allow writing to user in SourceConnection Signed-off-by: Jens Langhammer #1888 --- .../sources/oauth/api/source_connection.py | 1 - schema.yml | 18 +++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/authentik/sources/oauth/api/source_connection.py b/authentik/sources/oauth/api/source_connection.py index b0bdc9e8d..268089adb 100644 --- a/authentik/sources/oauth/api/source_connection.py +++ b/authentik/sources/oauth/api/source_connection.py @@ -16,7 +16,6 @@ class UserOAuthSourceConnectionSerializer(SourceSerializer): model = UserOAuthSourceConnection fields = ["pk", "user", "source", "identifier", "access_token"] extra_kwargs = { - "user": {"read_only": True}, "access_token": {"write_only": True}, } diff --git a/schema.yml b/schema.yml index 0d1ea69e9..52e6d924b 100644 --- a/schema.yml +++ b/schema.yml @@ -27952,8 +27952,8 @@ components: maxLength: 200 audience: type: string - description: Value of the audience restriction field of the assertion. - When left empty, no audience restriction will be added. + description: Value of the audience restriction field of the assertion. When + left empty, no audience restriction will be added. issuer: type: string minLength: 1 @@ -28252,6 +28252,8 @@ components: type: object description: OAuth Source Serializer properties: + user: + type: integer source: type: string format: uuid @@ -29559,8 +29561,8 @@ components: maxLength: 200 audience: type: string - description: Value of the audience restriction field of the assertion. - When left empty, no audience restriction will be added. + description: Value of the audience restriction field of the assertion. When + left empty, no audience restriction will be added. issuer: type: string description: Also known as EntityID @@ -29661,8 +29663,8 @@ components: maxLength: 200 audience: type: string - description: Value of the audience restriction field of the assertion. - When left empty, no audience restriction will be added. + description: Value of the audience restriction field of the assertion. When + left empty, no audience restriction will be added. issuer: type: string minLength: 1 @@ -30987,7 +30989,6 @@ components: title: ID user: type: integer - readOnly: true source: type: string format: uuid @@ -31003,6 +31004,8 @@ components: type: object description: OAuth Source Serializer properties: + user: + type: integer source: type: string format: uuid @@ -31017,6 +31020,7 @@ components: required: - identifier - source + - user UserReputation: type: object description: UserReputation Serializer