Skip to content

Commit e906138

Browse files
committed
Let sharees endpoint properly handle deck shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent fcc0d35 commit e906138

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

apps/files_sharing/lib/Controller/ShareesAPIController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class ShareesAPIController extends OCSController {
8383
'emails' => [],
8484
'circles' => [],
8585
'rooms' => [],
86+
'deck' => [],
8687
],
8788
'users' => [],
8889
'groups' => [],
@@ -92,6 +93,7 @@ class ShareesAPIController extends OCSController {
9293
'lookup' => [],
9394
'circles' => [],
9495
'rooms' => [],
96+
'deck' => [],
9597
'lookupEnabled' => false,
9698
];
9799

@@ -183,6 +185,10 @@ public function search(string $search = '', string $itemType = null, int $page =
183185
if ($this->shareManager->shareProviderExists(IShare::TYPE_ROOM)) {
184186
$shareTypes[] = IShare::TYPE_ROOM;
185187
}
188+
189+
if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) {
190+
$shareTypes[] = IShare::TYPE_DECK;
191+
}
186192
} else {
187193
$shareTypes[] = IShare::TYPE_GROUP;
188194
$shareTypes[] = IShare::TYPE_EMAIL;
@@ -193,6 +199,10 @@ public function search(string $search = '', string $itemType = null, int $page =
193199
$shareTypes[] = IShare::TYPE_CIRCLE;
194200
}
195201

202+
if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) {
203+
$shareTypes[] = IShare::TYPE_DECK;
204+
}
205+
196206
if ($shareType !== null && is_array($shareType)) {
197207
$shareTypes = array_intersect($shareTypes, $shareType);
198208
} elseif (is_numeric($shareType)) {

apps/files_sharing/src/components/SharingInput.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export default {
186186
this.SHARE_TYPES.SHARE_TYPE_CIRCLE,
187187
this.SHARE_TYPES.SHARE_TYPE_ROOM,
188188
this.SHARE_TYPES.SHARE_TYPE_GUEST,
189+
this.SHARE_TYPES.SHARE_TYPE_DECK,
189190
]
190191
191192
if (OC.getCapabilities().files_sharing.public.enabled === true) {

apps/files_sharing/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ Object.assign(OC, {
3232
SHARE_TYPE_GUEST: 8,
3333
SHARE_TYPE_REMOTE_GROUP: 9,
3434
SHARE_TYPE_ROOM: 10,
35+
SHARE_TYPE_DECK: 12,
3536
},
3637
})

apps/files_sharing/src/mixins/ShareTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default {
3131
SHARE_TYPE_REMOTE: OC.Share.SHARE_TYPE_REMOTE,
3232
SHARE_TYPE_CIRCLE: OC.Share.SHARE_TYPE_CIRCLE,
3333
SHARE_TYPE_GUEST: OC.Share.SHARE_TYPE_GUEST,
34+
SHARE_TYPE_DECK: OC.Share.SHARE_TYPE_DECK,
3435
SHARE_TYPE_REMOTE_GROUP: OC.Share.SHARE_TYPE_REMOTE_GROUP,
3536
SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM,
3637
},

lib/private/Share/Constants.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ class Constants {
7070
*/
7171
public const SHARE_TYPE_ROOM = 10;
7272
// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
73+
/**
74+
* @deprecated 21.0.0 - use IShare::TYPE_ROOM instead
75+
*/
76+
public const SHARE_TYPE_DECK = 12;
7377

7478
public const FORMAT_NONE = -1;
7579
public const FORMAT_STATUSES = -2;

0 commit comments

Comments
 (0)