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/shareitemmodel.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/shareitemmodel.js')
-rw-r--r-- | core/js/shareitemmodel.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js index 6bb8d75b91f..bff006f7ef3 100644 --- a/core/js/shareitemmodel.js +++ b/core/js/shareitemmodel.js @@ -47,6 +47,7 @@ * @property {Date} expiration optional? * @property {number} stime optional? * @property {string} uid_owner + * @property {string} displayname_owner */ /** @@ -408,6 +409,32 @@ }, /** + * @param shareIndex + * @returns {string} + */ + getSharedBy: function(shareIndex) { + /** @type OC.Share.Types.ShareInfo **/ + var share = this.get('shares')[shareIndex]; + if(!_.isObject(share)) { + throw "Unknown Share"; + } + return share.uid_owner; + }, + + /** + * @param shareIndex + * @returns {string} + */ + getSharedByDisplayName: function(shareIndex) { + /** @type OC.Share.Types.ShareInfo **/ + var share = this.get('shares')[shareIndex]; + if(!_.isObject(share)) { + throw "Unknown Share"; + } + return share.displayname_owner; + }, + + /** * returns the array index of a sharee for a provided shareId * * @param shareId |