diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 10:20:05 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 10:20:05 +0100 |
commit | e1f2965e54a838cb3ec69c4682d7bfe95cee9173 (patch) | |
tree | ecaf0d025418a4c4d00824f5e0a8e93fba3eae3e | |
parent | 085f3f58fa440271d84f9bbb4487252799939cb2 (diff) | |
parent | 11d8b336e2fdf5ce3893c66059c2cd2d11a81d13 (diff) | |
download | nextcloud-server-e1f2965e54a838cb3ec69c4682d7bfe95cee9173.tar.gz nextcloud-server-e1f2965e54a838cb3ec69c4682d7bfe95cee9173.zip |
Merge pull request #20949 from owncloud/fix_20892
[Sharing] Properly check if a group already has access
-rw-r--r-- | lib/private/share/share.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 70f9a6e8920..8899df25636 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -745,10 +745,8 @@ class Share extends Constants { // The check for each user in the group is done inside the put() function if ($checkExists = self::getItems($itemType, $itemSource, self::SHARE_TYPE_GROUP, $shareWith, null, self::FORMAT_NONE, null, 1, true, true)) { - // Only allow the same share to occur again if it is the same - // owner and is not a group share, this use case is for increasing - // permissions for a specific user - if ($checkExists['uid_owner'] != $uidOwner || $checkExists['share_type'] == $shareType) { + + if ($checkExists['share_with'] === $shareWith && $checkExists['share_type'] === \OCP\Share::SHARE_TYPE_GROUP) { $message = 'Sharing %s failed, because this item is already shared with %s'; $message_t = $l->t('Sharing %s failed, because this item is already shared with %s', array($itemSourceName, $shareWith)); \OCP\Util::writeLog('OCP\Share', sprintf($message, $itemSourceName, $shareWith), \OCP\Util::DEBUG); |