From 003241e8474da4239d69fc63b3e812b86d0e3667 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Tue, 9 Oct 2012 10:36:24 +0200 Subject: fix for bug #1942: Allow user to share with every group if "allow users to share with anyone" is set --- core/ajax/share.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/ajax/share.php b/core/ajax/share.php index 446d4cc32ec..8309a062119 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -123,7 +123,11 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo } } $count = 0; - $groups = OC_Group::getUserGroups(OC_User::getUser()); + if (\OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global') == 'groups_only') { + $groups = OC_Group::getUserGroups(OC_User::getUser()); + } else { + $groups = OC_Group::getGroups(); + } foreach ($groups as $group) { if ($count < 4) { if (stripos($group, $_GET['search']) !== false -- cgit v1.2.3