summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 41f9eb5e0aa..4118a8a0188 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -841,6 +841,20 @@
}
}
return time;
+ },
+
+ /**
+ * Returns a list of share types from the existing shares.
+ *
+ * @return {Array.<int>} array of share types
+ */
+ getShareTypes: function() {
+ var result;
+ result = _.pluck(this.getSharesWithCurrentItem(), 'share_type');
+ if (this.hasLinkShare()) {
+ result.push(OC.Share.SHARE_TYPE_LINK);
+ }
+ return _.uniq(result);
}
});