diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 922623aa46..e8e50cf25d 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -600,13 +600,6 @@ class ShareAPIController extends OCSController { if (!\OC::$server->getAppManager()->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) { throw new OCSNotFoundException($this->l->t('You cannot share to a Circle if the app is not enabled')); } - - $circle = \OCA\Circles\Api\v1\Circles::detailsCircle($shareWith); - - // Valid circle is required to share - if ($circle === null) { - throw new OCSNotFoundException($this->l->t('Please specify a valid circle')); - } $share->setSharedWith($shareWith); $share->setPermissions($permissions); } elseif ($shareType === IShare::TYPE_ROOM) { diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 49a716e321..3b8b9fb241 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -245,9 +245,8 @@ class Manager implements IManager { throw new \InvalidArgumentException('SharedWith should not be empty'); } } elseif ($share->getShareType() === IShare::TYPE_CIRCLE) { - $circle = \OCA\Circles\Api\v1\Circles::detailsCircle($share->getSharedWith()); - if ($circle === null) { - throw new \InvalidArgumentException('SharedWith is not a valid circle'); + if ($share->getSharedWith() === null) { + throw new \InvalidArgumentException('SharedWith should not be empty'); } } elseif ($share->getShareType() === IShare::TYPE_ROOM) { } elseif ($share->getShareType() === IShare::TYPE_DECK) { @@ -999,7 +998,7 @@ class Manager implements IManager { if (empty($plainTextPassword) && $share->getSendPasswordByTalk()) { throw new \InvalidArgumentException('Can’t enable sending the password by Talk with an empty password'); } - + /** * If we're in a mail share, we need to force a password change * as either the user is not aware of the password or is already (received by mail)