summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-03-09 13:56:27 +0100
committerFelix A. Epp <work@felixepp.de>2017-05-04 00:30:51 +0200
commit2e32ab945b77659cb70dcc1eadb71abf74efab5d (patch)
tree25efbb880096949bc19d48620413768b80647bd5 /core/js/shareitemmodel.js
parent3dbf30c2204cde1d493d7837857519d65cfd5049 (diff)
downloadnextcloud-server-2e32ab945b77659cb70dcc1eadb71abf74efab5d.tar.gz
nextcloud-server-2e32ab945b77659cb70dcc1eadb71abf74efab5d.zip
Make files drop more permanent
Implement the suggestions from #2207 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 4118a8a0188..afe86fa464b 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -487,6 +487,13 @@
},
/**
+ * @return {int}
+ */
+ getPermissions: function() {
+ return this.get('permissions');
+ },
+
+ /**
* @returns {boolean}
*/
sharePermissionPossible: function() {
@@ -568,6 +575,17 @@
|| this.hasDeletePermission(shareIndex);
},
+ /**
+ * @returns {int}
+ */
+ linkSharePermissions: function() {
+ if (!this.hasLinkShare()) {
+ return -1;
+ } else {
+ return this.get('linkShare').permissions;
+ }
+ },
+
_getUrl: function(base, params) {
params = _.extend({format: 'json'}, params || {});
return OC.linkToOCS('apps/files_sharing/api/v1', 2) + base + '?' + OC.buildQueryString(params);