From ce26d643febcff6a3edb776f45a8a229513812fa Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Mon, 25 Apr 2022 14:13:55 +0200 Subject: [PATCH] Add changelog item --- .../enhancement-enforce-share-type-guest-if-applies | 7 +++++++ src/shareInfo.js | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/enhancement-enforce-share-type-guest-if-applies diff --git a/changelog/unreleased/enhancement-enforce-share-type-guest-if-applies b/changelog/unreleased/enhancement-enforce-share-type-guest-if-applies new file mode 100644 index 000000000..ea00b95ba --- /dev/null +++ b/changelog/unreleased/enhancement-enforce-share-type-guest-if-applies @@ -0,0 +1,7 @@ +Enhancement: Enforce `share_type` guest if applies + +With oC10, the `share_type` is not set to guest, if a user shares a resource with a guest user, +therefore we check check if the property `share_with_user_type` is present and set to `guest`, +if so we manipulate the `share_type` property and set it to guest. + +https://github.com/owncloud/owncloud-sdk/pull/1046 diff --git a/src/shareInfo.js b/src/shareInfo.js index dcede5a08..9dbf67282 100644 --- a/src/shareInfo.js +++ b/src/shareInfo.js @@ -6,11 +6,7 @@ * @param {object} ShareInfo containing information like id, url etc. of the share */ -const USER_TYPE_USER = 0 const USER_TYPE_GUEST = 1 -const SHARE_TYPE_USER = 0; -const SHARE_TYPE_GROUP = 1; -const SHARE_TYPE_LINK = 3; const SHARE_TYPE_GUEST = 4; class ShareInfo { @@ -27,7 +23,7 @@ class ShareInfo { } /** - * Oc10 does not emit if a share receiver is a user or a guest, + * oC10 does not emit if a share receiver is a user or a guest, * therefore we check if the property `share_with_user_type` is present and set to `USER_TYPE_GUEST`, * if so we manipulate the `share_type` property and set it to `SHARE_TYPE_GUEST` */