diff --git a/src/components/Document/DocumentActionsGroup/DocumentActionsGroupEntryDownload.vue b/src/components/Document/DocumentActionsGroup/DocumentActionsGroupEntryDownload.vue
index 2a126f7ccc..72680b059b 100644
--- a/src/components/Document/DocumentActionsGroup/DocumentActionsGroupEntryDownload.vue
+++ b/src/components/Document/DocumentActionsGroup/DocumentActionsGroupEntryDownload.vue
@@ -1,9 +1,9 @@
@@ -45,10 +40,12 @@ const blur = () => nextTick(() => window.document?.activeElement.blur())
maxRootContentLength.value
})
+ const isDownloadAllowed = computed(() => {
+ // Use nullish coalescing operator to allow download if the store/getter is undefined
+ return store?.getters['downloads/isDownloadAllowed'](documentRef.value) ?? true
+ })
+
const rootContentLength = computed(() => {
return documentRef.value?.root?.contentLength
})
@@ -79,6 +86,7 @@ export function useDocumentDownload(document) {
hasCleanableContentType,
embeddedDocumentDownloadMaxSize,
isRootTooBig,
+ isDownloadAllowed,
rootContentLength,
maxRootContentLength
}