diff options
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; } |