Forgot to include ObjectOwnedOrGrandtedPermissionsFilter on documents

This commit is contained in:
Michael Shamoon 2022-12-10 15:40:34 -08:00
parent 2f32565476
commit 7050f29cff

View File

@ -233,7 +233,12 @@ class DocumentViewSet(
serializer_class = DocumentSerializer
pagination_class = StandardPagination
permission_classes = (IsAuthenticated, PaperlessObjectPermissions)
filter_backends = (DjangoFilterBackend, SearchFilter, OrderingFilter)
filter_backends = (
DjangoFilterBackend,
SearchFilter,
OrderingFilter,
ObjectOwnedOrGrandtedPermissionsFilter,
)
filterset_class = DocumentFilterSet
search_fields = ("title", "correspondent__name", "content")
ordering_fields = (