summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-02-05 14:00:05 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2015-04-09 11:16:08 +0200
commit332ea778651386671e7b096769c42a00b69cc32d (patch)
tree7668bcdeac5112b4aec394c743ec44785e1e8d72 /lib/private
parentba52f6f8fc0d88000332e9e64c48a56c526823d9 (diff)
downloadnextcloud-server-332ea778651386671e7b096769c42a00b69cc32d.tar.gz
nextcloud-server-332ea778651386671e7b096769c42a00b69cc32d.zip
only create a db entry for the user in case of a name conflict on group share
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/share/share.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index e624e8da451..729dbe79d38 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1905,7 +1905,11 @@ class Share extends \OC\Share\Constants {
$isGroupShare = false;
if ($shareType == self::SHARE_TYPE_GROUP) {
$isGroupShare = true;
- $users = \OC_Group::usersInGroup($shareWith['group']);
+ if (isset($shareWith['users'])) {
+ $users = $shareWith['users'];
+ } else {
+ $users = \OC_Group::usersInGroup($shareWith['group']);
+ }
// remove current user from list
if (in_array(\OCP\User::getUser(), $users)) {
unset($users[array_search(\OCP\User::getUser(), $users)]);
@@ -2016,7 +2020,8 @@ class Share extends \OC\Share\Constants {
$fileTarget = null;
}
- if ($itemTarget === $groupItemTarget && (isset($fileSource) && $fileTarget === $groupItemTarget)) {
+ if (($itemTarget === $groupItemTarget) &&
+ (!isset($fileSource) || $fileTarget === $groupFileTarget)) {
continue;
}
}