aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-11-10 13:11:22 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-11-10 13:11:22 +0100
commit2023878d537374b47494eb8ce44d3757b3692626 (patch)
tree8704372279875cc01e13024f704a6bc3336a6d0d /apps/files_sharing/js/share.js
parent8afb623f088904ba58a0783c726bbe1cf3bac084 (diff)
parent83126ab67596a29200e1624088801312935e4580 (diff)
downloadnextcloud-server-2023878d537374b47494eb8ce44d3757b3692626.tar.gz
nextcloud-server-2023878d537374b47494eb8ce44d3757b3692626.zip
Merge pull request #10966 from owncloud/storage-root-share-permissions
Dont' use mountpoint permissions as share permissions for external storages
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index eccd21c9248..853e9f689f6 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -19,6 +19,11 @@
OCA.Files.FileList.prototype._createRow = function(fileData) {
var tr = oldCreateRow.apply(this, arguments);
var sharePermissions = fileData.permissions;
+ if (fileData.mountType && fileData.mountType === "external-root"){
+ // for external storages we cant use the permissions of the mountpoint
+ // instead we show all permissions and only use the share permissions from the mountpoint to handle resharing
+ sharePermissions = sharePermissions | (OC.PERMISSION_ALL & ~OC.PERMISSION_SHARE);
+ }
if (fileData.type === 'file') {
// files can't be shared with delete permissions
sharePermissions = sharePermissions & ~OC.PERMISSION_DELETE;