diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-10 17:07:45 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-11 13:56:03 +0200 |
commit | 58f959864abbce05af586a162fde2fc10b039478 (patch) | |
tree | d3da25848267287181cd834f4cb8aa516e414413 /core/js/sharedialogshareelistview.js | |
parent | 18580395d4095842462e035a2d947e716413d2fd (diff) | |
download | nextcloud-server-58f959864abbce05af586a162fde2fc10b039478.tar.gz nextcloud-server-58f959864abbce05af586a162fde2fc10b039478.zip |
Show 'shared via' in share list for reshares
Fixes #1330
userA shares a file to userB
userB shares that file to userC
userA can see both userB and userC.
Now they can also see that userB shared it to user C
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/js/sharedialogshareelistview.js')
-rw-r--r-- | core/js/sharedialogshareelistview.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index a9945b594e1..6903dd57c33 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -190,6 +190,8 @@ var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex); var shareWithTitle = ''; var shareType = this.model.getShareType(shareIndex); + var sharedBy = this.model.getSharedBy(shareIndex); + var sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex); var hasPermissionOverride = {}; if (shareType === OC.Share.SHARE_TYPE_GROUP) { @@ -211,6 +213,17 @@ shareWithTitle = shareWith; } + if (sharedBy !== oc_current_user) { + var empty = shareWithTitle === ''; + if (!empty) { + shareWithTitle += ' ('; + } + shareWithTitle += t('core', 'shared by {sharer}', {sharer: sharedByDisplayName}); + if (!empty) { + shareWithTitle += ')'; + } + } + var share = this.model.get('shares')[shareIndex]; var password = share.password; var hasPassword = password !== null && password !== ''; |