summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-12-03 16:02:47 +0100
committerJulius Härtl <jus@bitgrid.net>2020-12-09 13:20:23 +0100
commite906138d8da5908917fb523cb3e3484372cea16b (patch)
treed6d887a263a5add7b55fac12cae15196291b6f65
parentfcc0d358959f9134ad5f2023f66fa833f6383fba (diff)
downloadnextcloud-server-e906138d8da5908917fb523cb3e3484372cea16b.tar.gz
nextcloud-server-e906138d8da5908917fb523cb3e3484372cea16b.zip
Let sharees endpoint properly handle deck shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php10
-rw-r--r--apps/files_sharing/src/components/SharingInput.vue1
-rw-r--r--apps/files_sharing/src/index.js1
-rw-r--r--apps/files_sharing/src/mixins/ShareTypes.js1
-rw-r--r--lib/private/Share/Constants.php4
5 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index 0509ba72f1a..a2b39b40772 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -83,6 +83,7 @@ class ShareesAPIController extends OCSController {
'emails' => [],
'circles' => [],
'rooms' => [],
+ 'deck' => [],
],
'users' => [],
'groups' => [],
@@ -92,6 +93,7 @@ class ShareesAPIController extends OCSController {
'lookup' => [],
'circles' => [],
'rooms' => [],
+ 'deck' => [],
'lookupEnabled' => false,
];
@@ -183,6 +185,10 @@ class ShareesAPIController extends OCSController {
if ($this->shareManager->shareProviderExists(IShare::TYPE_ROOM)) {
$shareTypes[] = IShare::TYPE_ROOM;
}
+
+ if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) {
+ $shareTypes[] = IShare::TYPE_DECK;
+ }
} else {
$shareTypes[] = IShare::TYPE_GROUP;
$shareTypes[] = IShare::TYPE_EMAIL;
@@ -193,6 +199,10 @@ class ShareesAPIController extends OCSController {
$shareTypes[] = IShare::TYPE_CIRCLE;
}
+ if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) {
+ $shareTypes[] = IShare::TYPE_DECK;
+ }
+
if ($shareType !== null && is_array($shareType)) {
$shareTypes = array_intersect($shareTypes, $shareType);
} elseif (is_numeric($shareType)) {
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue
index 588ed634166..5326eaf01d3 100644
--- a/apps/files_sharing/src/components/SharingInput.vue
+++ b/apps/files_sharing/src/components/SharingInput.vue
@@ -186,6 +186,7 @@ export default {
this.SHARE_TYPES.SHARE_TYPE_CIRCLE,
this.SHARE_TYPES.SHARE_TYPE_ROOM,
this.SHARE_TYPES.SHARE_TYPE_GUEST,
+ this.SHARE_TYPES.SHARE_TYPE_DECK,
]
if (OC.getCapabilities().files_sharing.public.enabled === true) {
diff --git a/apps/files_sharing/src/index.js b/apps/files_sharing/src/index.js
index 786b648aea1..3c0d0e65c8f 100644
--- a/apps/files_sharing/src/index.js
+++ b/apps/files_sharing/src/index.js
@@ -32,5 +32,6 @@ Object.assign(OC, {
SHARE_TYPE_GUEST: 8,
SHARE_TYPE_REMOTE_GROUP: 9,
SHARE_TYPE_ROOM: 10,
+ SHARE_TYPE_DECK: 12,
},
})
diff --git a/apps/files_sharing/src/mixins/ShareTypes.js b/apps/files_sharing/src/mixins/ShareTypes.js
index b84dbf96d98..6e9524ce952 100644
--- a/apps/files_sharing/src/mixins/ShareTypes.js
+++ b/apps/files_sharing/src/mixins/ShareTypes.js
@@ -31,6 +31,7 @@ export default {
SHARE_TYPE_REMOTE: OC.Share.SHARE_TYPE_REMOTE,
SHARE_TYPE_CIRCLE: OC.Share.SHARE_TYPE_CIRCLE,
SHARE_TYPE_GUEST: OC.Share.SHARE_TYPE_GUEST,
+ SHARE_TYPE_DECK: OC.Share.SHARE_TYPE_DECK,
SHARE_TYPE_REMOTE_GROUP: OC.Share.SHARE_TYPE_REMOTE_GROUP,
SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM,
},
diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php
index 2310859c5be..0ba68428c87 100644
--- a/lib/private/Share/Constants.php
+++ b/lib/private/Share/Constants.php
@@ -70,6 +70,10 @@ class Constants {
*/
public const SHARE_TYPE_ROOM = 10;
// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
+ /**
+ * @deprecated 21.0.0 - use IShare::TYPE_ROOM instead
+ */
+ public const SHARE_TYPE_DECK = 12;
public const FORMAT_NONE = -1;
public const FORMAT_STATUSES = -2;