sources/oauth: allow writing to user in SourceConnection

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

#1888
This commit is contained in:
Jens Langhammer 2021-12-18 15:33:46 +01:00
parent a95779157d
commit 4c5537ddfe
2 changed files with 11 additions and 8 deletions

View file

@ -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},
}

View file

@ -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