mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-21 04:52:40 +00:00
preview should also require global view doc
This commit is contained in:
2 files changed
+30
-3
No files matched your search
@@ -5847,6 +5847,12 @@ class OcrTemplateViewSet(BulkPermissionMixin, PassUserMixin, ModelViewSet[OcrTem
|
||||
)
|
||||
ordering_fields = ("name",)
|
||||
|
||||
def get_permissions(self):
|
||||
permissions = super().get_permissions()
|
||||
if self.action in {"document_page_image", "test_zone"}:
|
||||
permissions.append(ViewDocumentsPermissions())
|
||||
return permissions
|
||||
|
||||
@action(
|
||||
detail=False,
|
||||
methods=["get"],
|
||||
|
||||
Reference in new issue
Block a user