aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/utils/permissions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/utils/permissions.ts')
-rw-r--r--apps/files/src/utils/permissions.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/src/utils/permissions.ts b/apps/files/src/utils/permissions.ts
index 2c85ede1659..9b4c42bf49c 100644
--- a/apps/files/src/utils/permissions.ts
+++ b/apps/files/src/utils/permissions.ts
@@ -17,6 +17,13 @@ export function isDownloadable(node: Node): boolean {
return false
}
+ // check hide-download property of shares
+ if (node.attributes['hide-download'] === true
+ || node.attributes['hide-download'] === 'true'
+ ) {
+ return false
+ }
+
// If the mount type is a share, ensure it got download permissions.
if (node.attributes['share-attributes']) {
const shareAttributes = JSON.parse(node.attributes['share-attributes'] || '[]') as Array<ShareAttribute>