aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share/Backend.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-03-15 13:03:34 +0100
committerGitHub <noreply@github.com>2024-03-15 13:03:34 +0100
commit9338ef36ded767f2c35b7ec575b351859420ed09 (patch)
tree65c53c6a36f300859dc22b2d423275bcf2911367 /tests/lib/Share/Backend.php
parent6b09a79227a5dc98aa4620c6e5e15b610a06c806 (diff)
parentdf1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff)
downloadnextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.tar.gz
nextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.zip
Merge branch 'master' into refactor/OC-Server-getShareManager
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'tests/lib/Share/Backend.php')
-rw-r--r--tests/lib/Share/Backend.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php
index 18443a4e247..f383d804971 100644
--- a/tests/lib/Share/Backend.php
+++ b/tests/lib/Share/Backend.php
@@ -21,6 +21,10 @@
namespace Test\Share;
+use OC\Share20\Manager;
+use OCP\Server;
+use OCP\Share\IShare;
+
class Backend implements \OCP\Share_Backend {
public const FORMAT_SOURCE = 0;
public const FORMAT_TARGET = 1;
@@ -46,7 +50,11 @@ class Backend implements \OCP\Share_Backend {
}
- $shares = \OC\Share\Share::getItemsSharedWithUser('test', $shareWith);
+ $shareManager = Server::get(Manager::class);
+ $shares = array_merge(
+ $shareManager->getSharedWith($shareWith, IShare::TYPE_USER),
+ $shareManager->getSharedWith($shareWith, IShare::TYPE_GROUP),
+ );
$knownTargets = [];
foreach ($shares as $share) {