summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 3ced66a1a78..56ed3f0039b 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -275,6 +275,13 @@
/**
* @returns {boolean}
*/
+ isHideFileListSet: function() {
+ return this.get('hideFileListStatus');
+ },
+
+ /**
+ * @returns {boolean}
+ */
isFolder: function() {
return this.get('itemType') === 'folder';
},
@@ -685,6 +692,16 @@
});
}
+ var hideFileListStatus = false;
+ if(!_.isUndefined(data.shares)) {
+ $.each(data.shares, function (key, value) {
+ if (value.share_type === OC.Share.SHARE_TYPE_LINK) {
+ hideFileListStatus = (value.permissions & OC.PERMISSION_READ) ? false : true;
+ return true;
+ }
+ });
+ }
+
/** @type {OC.Share.Types.ShareInfo[]} **/
var shares = _.map(data.shares, function(share) {
// properly parse some values because sometimes the server
@@ -757,7 +774,8 @@
shares: shares,
linkShare: linkShare,
permissions: permissions,
- allowPublicUploadStatus: allowPublicUploadStatus
+ allowPublicUploadStatus: allowPublicUploadStatus,
+ hideFileListStatus: hideFileListStatus
};
},