mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Fix documents permissions display
This commit is contained in:
parent
451e02b7ca
commit
1a823e5ec0
@ -344,22 +344,12 @@ class DocumentTypeViewSet(ModelViewSet, PermissionsAwareDocumentCountMixin):
|
|||||||
|
|
||||||
|
|
||||||
@extend_schema_view(
|
@extend_schema_view(
|
||||||
list=extend_schema(
|
|
||||||
parameters=[
|
|
||||||
OpenApiParameter(
|
|
||||||
name="full_perms",
|
|
||||||
type=OpenApiTypes.BOOL,
|
|
||||||
location=OpenApiParameter.QUERY,
|
|
||||||
),
|
|
||||||
OpenApiParameter(
|
|
||||||
name="fields",
|
|
||||||
type=OpenApiTypes.STR,
|
|
||||||
many=True,
|
|
||||||
location=OpenApiParameter.QUERY,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
retrieve=extend_schema(
|
retrieve=extend_schema(
|
||||||
|
description="Retrieve a single document",
|
||||||
|
responses={
|
||||||
|
200: DocumentSerializer(all_fields=True),
|
||||||
|
400: None,
|
||||||
|
},
|
||||||
parameters=[
|
parameters=[
|
||||||
OpenApiParameter(
|
OpenApiParameter(
|
||||||
name="full_perms",
|
name="full_perms",
|
||||||
@ -1049,6 +1039,26 @@ class DocumentViewSet(
|
|||||||
return Response(sorted(entries, key=lambda x: x["timestamp"], reverse=True))
|
return Response(sorted(entries, key=lambda x: x["timestamp"], reverse=True))
|
||||||
|
|
||||||
|
|
||||||
|
@extend_schema_view(
|
||||||
|
list=extend_schema(
|
||||||
|
parameters=[
|
||||||
|
OpenApiParameter(
|
||||||
|
name="full_perms",
|
||||||
|
type=OpenApiTypes.BOOL,
|
||||||
|
location=OpenApiParameter.QUERY,
|
||||||
|
),
|
||||||
|
OpenApiParameter(
|
||||||
|
name="fields",
|
||||||
|
type=OpenApiTypes.STR,
|
||||||
|
many=True,
|
||||||
|
location=OpenApiParameter.QUERY,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
responses={
|
||||||
|
200: DocumentSerializer(many=True, all_fields=True),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
class UnifiedSearchViewSet(DocumentViewSet):
|
class UnifiedSearchViewSet(DocumentViewSet):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user