aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileinfomodel.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/fileinfomodel.js')
-rw-r--r--apps/files/js/fileinfomodel.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files/js/fileinfomodel.js b/apps/files/js/fileinfomodel.js
index 83a8c62592b..79575109656 100644
--- a/apps/files/js/fileinfomodel.js
+++ b/apps/files/js/fileinfomodel.js
@@ -126,7 +126,18 @@
});
return deferred.promise();
- }
+ },
+
+ canDownload: function() {
+ for (const i in this.attributes.shareAttributes) {
+ const attr = this.attributes.shareAttributes[i]
+ if (attr.scope === 'permissions' && attr.key === 'download') {
+ return attr.enabled
+ }
+ }
+
+ return true
+ },
});
if (!OCA.Files) {