aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/External
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-08-21 16:15:23 +0200
committerJoas Schilling <coding@schilljs.com>2019-11-12 17:13:38 +0100
commitdcdbea54e60d13d2508b71ebdcb7992f2ae5ef34 (patch)
tree4157d8fbbec25f53ab99df3c7e495f8d8862fc36 /apps/files_sharing/lib/External
parent6f8c7885b6263b7e23f0e48c1376b7e67417be2c (diff)
downloadnextcloud-server-dcdbea54e60d13d2508b71ebdcb7992f2ae5ef34.tar.gz
nextcloud-server-dcdbea54e60d13d2508b71ebdcb7992f2ae5ef34.zip
Respect the accepted flag for group and user shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing/lib/External')
-rw-r--r--apps/files_sharing/lib/External/Manager.php3
1 files changed, 2 insertions, 1 deletions
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) {