sources: fix parent serializer for user connections
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
5ddd138c97
commit
85b6bfbe5f
|
@ -4,12 +4,12 @@ from rest_framework.filters import OrderingFilter, SearchFilter
|
||||||
from rest_framework.viewsets import ModelViewSet
|
from rest_framework.viewsets import ModelViewSet
|
||||||
|
|
||||||
from authentik.api.authorization import OwnerFilter, OwnerSuperuserPermissions
|
from authentik.api.authorization import OwnerFilter, OwnerSuperuserPermissions
|
||||||
from authentik.core.api.sources import SourceSerializer
|
from authentik.core.api.sources import UserSourceConnectionSerializer
|
||||||
from authentik.core.api.used_by import UsedByMixin
|
from authentik.core.api.used_by import UsedByMixin
|
||||||
from authentik.sources.oauth.models import UserOAuthSourceConnection
|
from authentik.sources.oauth.models import UserOAuthSourceConnection
|
||||||
|
|
||||||
|
|
||||||
class UserOAuthSourceConnectionSerializer(SourceSerializer):
|
class UserOAuthSourceConnectionSerializer(UserSourceConnectionSerializer):
|
||||||
"""OAuth Source Serializer"""
|
"""OAuth Source Serializer"""
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -4,12 +4,12 @@ from rest_framework.filters import OrderingFilter, SearchFilter
|
||||||
from rest_framework.viewsets import ModelViewSet
|
from rest_framework.viewsets import ModelViewSet
|
||||||
|
|
||||||
from authentik.api.authorization import OwnerFilter, OwnerSuperuserPermissions
|
from authentik.api.authorization import OwnerFilter, OwnerSuperuserPermissions
|
||||||
from authentik.core.api.sources import SourceSerializer
|
from authentik.core.api.sources import UserSourceConnectionSerializer
|
||||||
from authentik.core.api.used_by import UsedByMixin
|
from authentik.core.api.used_by import UsedByMixin
|
||||||
from authentik.sources.plex.models import PlexSourceConnection
|
from authentik.sources.plex.models import PlexSourceConnection
|
||||||
|
|
||||||
|
|
||||||
class PlexSourceConnectionSerializer(SourceSerializer):
|
class PlexSourceConnectionSerializer(UserSourceConnectionSerializer):
|
||||||
"""Plex Source connection Serializer"""
|
"""Plex Source connection Serializer"""
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
24
schema.yml
24
schema.yml
|
@ -27782,9 +27782,6 @@ components:
|
||||||
type: object
|
type: object
|
||||||
description: Plex Source connection Serializer
|
description: Plex Source connection Serializer
|
||||||
properties:
|
properties:
|
||||||
source:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -28364,9 +28361,6 @@ components:
|
||||||
properties:
|
properties:
|
||||||
user:
|
user:
|
||||||
type: integer
|
type: integer
|
||||||
source:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -28566,8 +28560,9 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
readOnly: true
|
readOnly: true
|
||||||
source:
|
source:
|
||||||
type: string
|
allOf:
|
||||||
format: uuid
|
- $ref: '#/components/schemas/Source'
|
||||||
|
readOnly: true
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
plex_token:
|
plex_token:
|
||||||
|
@ -28582,9 +28577,6 @@ components:
|
||||||
type: object
|
type: object
|
||||||
description: Plex Source connection Serializer
|
description: Plex Source connection Serializer
|
||||||
properties:
|
properties:
|
||||||
source:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -28594,7 +28586,6 @@ components:
|
||||||
required:
|
required:
|
||||||
- identifier
|
- identifier
|
||||||
- plex_token
|
- plex_token
|
||||||
- source
|
|
||||||
PlexSourceRequest:
|
PlexSourceRequest:
|
||||||
type: object
|
type: object
|
||||||
description: Plex Source Serializer
|
description: Plex Source Serializer
|
||||||
|
@ -31201,8 +31192,9 @@ components:
|
||||||
user:
|
user:
|
||||||
type: integer
|
type: integer
|
||||||
source:
|
source:
|
||||||
type: string
|
allOf:
|
||||||
format: uuid
|
- $ref: '#/components/schemas/Source'
|
||||||
|
readOnly: true
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 255
|
maxLength: 255
|
||||||
|
@ -31217,9 +31209,6 @@ components:
|
||||||
properties:
|
properties:
|
||||||
user:
|
user:
|
||||||
type: integer
|
type: integer
|
||||||
source:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
identifier:
|
identifier:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -31230,7 +31219,6 @@ components:
|
||||||
nullable: true
|
nullable: true
|
||||||
required:
|
required:
|
||||||
- identifier
|
- identifier
|
||||||
- source
|
|
||||||
- user
|
- user
|
||||||
UserPasswordSetRequest:
|
UserPasswordSetRequest:
|
||||||
type: object
|
type: object
|
||||||
|
|
Reference in New Issue