diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-10-10 10:15:42 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-07 14:58:45 +0100 |
commit | 9e5e120ef9869b7c52d90e85782ec83a9217275d (patch) | |
tree | 139a9c041b3436573550115856720252099601c0 /apps/files_sharing/js/sharetabview.js | |
parent | bc1cb8a6d09d97df93b7914e020759eb7df73df1 (diff) | |
download | nextcloud-server-9e5e120ef9869b7c52d90e85782ec83a9217275d.tar.gz nextcloud-server-9e5e120ef9869b7c52d90e85782ec83a9217275d.zip |
refactor share permission logic into own method to reuse it for the share tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing/js/sharetabview.js')
-rw-r--r-- | apps/files_sharing/js/sharetabview.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/js/sharetabview.js b/apps/files_sharing/js/sharetabview.js index 2c7070aa3d5..7bb1f1229d0 100644 --- a/apps/files_sharing/js/sharetabview.js +++ b/apps/files_sharing/js/sharetabview.js @@ -50,6 +50,10 @@ if (this.model) { this.$el.html(this.template()); + if (_.isUndefined(this.model.get('sharePermissions'))) { + this.model.set('sharePermissions', OCA.Sharing.Util.getSharePermissions(this.model.attributes)); + } + // TODO: the model should read these directly off the passed fileInfoModel var attributes = { itemType: this.model.isDirectory() ? 'folder' : 'file', |