aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-09 10:36:24 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-09 10:36:24 +0200
commit003241e8474da4239d69fc63b3e812b86d0e3667 (patch)
tree8041f4e7b7d93845cceb898d3f8d5151e3b0a0c4 /core
parentf1fc73ea5b35eb7a260ad6f4cf267555c11b5c48 (diff)
downloadnextcloud-server-003241e8474da4239d69fc63b3e812b86d0e3667.tar.gz
nextcloud-server-003241e8474da4239d69fc63b3e812b86d0e3667.zip
fix for bug #1942: Allow user to share with every group if "allow users to share with anyone" is set
Diffstat (limited to 'core')
-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