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