diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-08 19:52:37 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-26 12:14:37 +0200 |
commit | 0771dad57fc9683b9abf694fb57a1cb91ca67aa2 (patch) | |
tree | 4e97e6956578b8d37e59c9b69cdacf06bb8a163a /apps/files_sharing | |
parent | b7e8ab97e731b77ef2ec519bfb98019516b7f682 (diff) | |
download | nextcloud-server-0771dad57fc9683b9abf694fb57a1cb91ca67aa2.tar.gz nextcloud-server-0771dad57fc9683b9abf694fb57a1cb91ca67aa2.zip |
Do not add sharePermission logic in JS
We have a dedicated dav property. We should do all the magic in 1 place.
Not several.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/js/share.js | 15 |
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; } }; })(); |