diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-14 12:14:21 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-14 12:14:21 +0200 |
commit | 18790858caea8f20f09ade8c7e3039da6dd1483b (patch) | |
tree | 223475960a605597e56566ca17ea1dfe671b8f40 /apps/files_sharing | |
parent | a349f2a9f5c851dcbcadca203d2ffc4635706400 (diff) | |
download | nextcloud-server-18790858caea8f20f09ade8c7e3039da6dd1483b.tar.gz nextcloud-server-18790858caea8f20f09ade8c7e3039da6dd1483b.zip |
Fix share by/with check
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 914bfd6ae15..6c0aae1eb11 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -274,7 +274,7 @@ } if (shares.ocs && shares.ocs.data) { - files = files.concat(this._makeFilesFromShares(shares.ocs.data)); + files = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser)); } if (remoteShares && remoteShares.ocs && remoteShares.ocs.data) { @@ -282,7 +282,7 @@ } if (additionnalShares && additionnalShares[0] && additionnalShares[0].ocs && additionnalShares[0].ocs.data) { - files = files.concat(this._makeFilesFromShares(additionnalShares[0].ocs.data)); + files = files.concat(this._makeFilesFromShares(additionnalShares[0].ocs.data, !this._sharedWithUser)); } this.setFiles(files); @@ -323,7 +323,7 @@ * @param {Array} data OCS API share array * @return {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info */ - _makeFilesFromShares: function(data) { + _makeFilesFromShares: function(data, sharedWithUser) { /* jshint camelcase: false */ var self = this; var files = data; @@ -359,7 +359,7 @@ stime: share.stime * 1000, expiration: share.expiration, }; - if (self._sharedWithUser) { + if (sharedWithUser) { file.shareOwner = share.displayname_owner; file.shareOwnerId = share.uid_owner; file.name = OC.basename(share.file_target); |