aboutsummaryrefslogtreecommitdiffstats
path: root/core/ajax/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax/share.php')
-rw-r--r--core/ajax/share.php6
1 files changed, 5 insertions, 1 deletions
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