diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-11-19 17:42:57 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-11-19 17:42:57 +0100 |
commit | 98ec0451be1d1ddd76b53195c96a545239e24da1 (patch) | |
tree | 964432782f06fb41520a171cf32bad2908f2716b /apps/files_sharing/js/sharedfilelist.js | |
parent | dc9eaf59dcede025edccf2d90cc211d739dbf935 (diff) | |
download | nextcloud-server-98ec0451be1d1ddd76b53195c96a545239e24da1.tar.gz nextcloud-server-98ec0451be1d1ddd76b53195c96a545239e24da1.zip |
Remove delete button in shared with others list
Whenever a file is shared with others or with link, a delete button used
to be visible that triggered a direct deletion.
This button has been removed to avoid accidental deletion from people
who might believe it was an unshare button. Unsharing is still possible
inside the share dropdown.
Diffstat (limited to 'apps/files_sharing/js/sharedfilelist.js')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 5869d7f77f7..7a7c24993c0 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -103,7 +103,11 @@ }, getDirectoryPermissions: function() { - return OC.PERMISSION_READ | OC.PERMISSION_DELETE; + var perms = OC.PERMISSION_READ; + if (this._sharedWithUser) { + perms |= OC.PERMISSION_DELETE; + } + return perms; }, updateStorageStatistics: function() { @@ -203,7 +207,11 @@ } file.name = OC.basename(share.path); file.path = OC.dirname(share.path); - file.permissions = OC.PERMISSION_ALL; + if (this._sharedWithUser) { + file.permissions = OC.PERMISSION_ALL; + } else { + file.permissions = OC.PERMISSION_ALL - OC.PERMISSION_DELETE; + } if (file.path) { file.extraData = share.path; } |