From dcdbea54e60d13d2508b71ebdcb7992f2ae5ef34 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Aug 2019 16:15:23 +0200 Subject: Respect the accepted flag for group and user shares Signed-off-by: Joas Schilling --- apps/files_sharing/lib/External/Manager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/lib/External/Manager.php') diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 0cf7d899234..aeb95a8f2f9 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -44,6 +44,7 @@ use OCP\IUserManager; use OCP\Notification\IManager; use OCP\OCS\IDiscoveryService; use OCP\Share; +use OCP\Share\IShare; class Manager { const STORAGE = '\OCA\Files_Sharing\External\Storage'; @@ -151,7 +152,7 @@ class Manager { public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted=false, $user = null, $remoteId = -1, $parent = -1) { $user = $user ? $user : $this->uid; - $accepted = $accepted ? 1 : 0; + $accepted = $accepted ? IShare::STATUS_ACCEPTED : IShare::STATUS_PENDING; $name = Filesystem::normalizePath('/' . $name); if (!$accepted) { -- cgit v1.2.3