summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-06-06 11:57:43 +0200
committericewind1991 <robin@icewind.nl>2014-06-06 11:57:43 +0200
commitc47d4ebbac7885ad91cf56355bd6aa09318ff8e8 (patch)
tree22a78530feb3c582cf5624b4089bd79c8e9b2afd /apps/files_sharing/js/share.js
parent0661d737e6f529b7d921ada441453f2b314c3445 (diff)
parent46f70aabfd399e1bc5517b2192ac2489189f9d94 (diff)
downloadnextcloud-server-c47d4ebbac7885ad91cf56355bd6aa09318ff8e8.tar.gz
nextcloud-server-c47d4ebbac7885ad91cf56355bd6aa09318ff8e8.zip
Merge pull request #8666 from owncloud/mount-remove
Support for (re)moving mountpoints
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index d63a590fb8e..47fe0bd2c57 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -18,12 +18,17 @@
var oldCreateRow = OCA.Files.FileList.prototype._createRow;
OCA.Files.FileList.prototype._createRow = function(fileData) {
var tr = oldCreateRow.apply(this, arguments);
+ var sharePermissions = fileData.permissions;
+ if (fileData.type === 'file') {
+ // files can't be shared with delete permissions
+ sharePermissions = sharePermissions & ~OC.PERMISSION_DELETE;
+ }
+ tr.attr('data-share-permissions', sharePermissions);
if (fileData.shareOwner) {
tr.attr('data-share-owner', fileData.shareOwner);
// user should always be able to rename a mount point
if (fileData.isShareMountPoint) {
tr.attr('data-permissions', fileData.permissions | OC.PERMISSION_UPDATE);
- tr.attr('data-reshare-permissions', fileData.permissions);
}
}
if (fileData.recipientsDisplayName) {
@@ -94,7 +99,7 @@
if ($tr.data('type') === 'dir') {
itemType = 'folder';
}
- var possiblePermissions = $tr.data('reshare-permissions');
+ var possiblePermissions = $tr.data('share-permissions');
if (_.isUndefined(possiblePermissions)) {
possiblePermissions = $tr.data('permissions');
}