From 5ad376806b75cdf2d9bda3efb6ff9f749a6a6929 Mon Sep 17 00:00:00 2001 From: barrydegraaff Date: Sat, 3 Dec 2016 08:37:42 +0100 Subject: [PATCH] fix bug when sharing links --- zimlet/OwnCloudCommons.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/zimlet/OwnCloudCommons.js b/zimlet/OwnCloudCommons.js index b36f083..6d2e831 100644 --- a/zimlet/OwnCloudCommons.js +++ b/zimlet/OwnCloudCommons.js @@ -67,6 +67,22 @@ OwnCloudCommons.prototype._getFirstLink = function(resources, links, callback, s [resource, resources, links, callback, sharePassword] ); + var DavForZimbraShareType = { + USER: 0, + GROUP: 1, + PUBLIC_LINK: 3, + FEDERATED_CLOUD_SHARE: 6 + }; + + var DavForZimbraSharePermission = { + READ: 1, // Default for public shares. + UPDATE: 2, + CREATE: 4, + DELETE: 8, + SHARE: 16, + ALL: 31 // Default. + }; + this._ownCloudConnector.createShare( resource.getHref(), DavForZimbraShareType.PUBLIC_LINK,