diff options
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareesAPIController.php')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 131fe918530..399cd4e00be 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -11,8 +11,9 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Daniel Kesselberg <mail@danielkesselberg.de> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Maxence Lange <maxence@nextcloud.com> * @author Morris Jobke <hey@morrisjobke.de> @@ -34,7 +35,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCA\Files_Sharing\Controller; use OCP\Constants; @@ -141,10 +141,10 @@ class ShareesAPIController extends OCSController { * @return DataResponse * @throws OCSBadRequestException */ - public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = true): DataResponse { + public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = false): DataResponse { // only search for string larger than a given threshold - $threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0); + $threshold = $this->config->getSystemValueInt('sharing.minSearchStringLength', 0); if (strlen($search) < $threshold) { return new DataResponse($this->result); } @@ -192,7 +192,9 @@ class ShareesAPIController extends OCSController { $shareTypes[] = IShare::TYPE_DECK; } } else { - $shareTypes[] = IShare::TYPE_GROUP; + if ($this->shareManager->allowGroupSharing()) { + $shareTypes[] = IShare::TYPE_GROUP; + } $shareTypes[] = IShare::TYPE_EMAIL; } |