]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow to create multiple link shares via share api
authorBjoern Schiessle <bjoern@schiessle.org>
Mon, 15 Oct 2018 10:43:22 +0000 (12:43 +0200)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 31 Oct 2018 05:55:52 +0000 (06:55 +0100)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
apps/files_sharing/lib/Controller/ShareAPIController.php

index a935189491e3442bbc92415bbc9daed97edef17c..5137b102b5a15ca848700040af5313a3207865b3 100644 (file)
@@ -447,15 +447,6 @@ class ShareAPIController extends OCSController {
                                throw new OCSNotFoundException($this->l->t('Public link sharing is disabled by the administrator'));
                        }
 
-                       /*
-                        * For now we only allow 1 link share.
-                        * Return the existing link share if this is a duplicate
-                        */
-                       $existingShares = $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_LINK, $path, false, 1, 0);
-                       if (!empty($existingShares)) {
-                               return new DataResponse($this->formatShare($existingShares[0]));
-                       }
-
                        if ($publicUpload === 'true') {
                                // Check if public upload is allowed
                                if (!$this->shareManager->shareApiLinkAllowPublicUpload()) {