summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-27 14:01:40 +0200
committerGitHub <noreply@github.com>2018-04-27 14:01:40 +0200
commitd8350c69ef37a5c8a38426170538d86ba522f1ab (patch)
treeac455c46334854945892c69af609022ab0d124e7 /apps/files_sharing/js/share.js
parent7102ddad50f4c71697e6e8233f338ec5482ef4df (diff)
parentd379770cf278af5f6717a1ef60abc770c4f960b8 (diff)
downloadnextcloud-server-d8350c69ef37a5c8a38426170538d86ba522f1ab.tar.gz
nextcloud-server-d8350c69ef37a5c8a38426170538d86ba522f1ab.zip
Merge pull request #9309 from nextcloud/feature/noid/no_js_sharepermission_logic
Do not add sharePermission logic in JS
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js15
1 files changed, 1 insertions, 14 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index b2715912d3b..22513e1b470 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -254,20 +254,7 @@
* @returns {String}
*/
getSharePermissions: function(fileData) {
- var sharePermissions = fileData.permissions;
- if (fileData.mountType && fileData.mountType === "external-root"){
- // for external storages we can't 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;
-
- // create permissions don't mean anything for files
- sharePermissions = sharePermissions & ~OC.PERMISSION_CREATE;
- }
- return sharePermissions;
+ return fileData.sharePermissions;
}
};
})();