summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-04 19:45:10 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-06 09:56:02 +0200
commiteec1c4398aeee1cda8a26a3a325fd16148473d57 (patch)
tree0fb9c0ee742d8969dcbea0799244cb89839bd168 /lib
parent5bbfdc35d7d26625f406e24149f1a45708049e34 (diff)
downloadnextcloud-server-eec1c4398aeee1cda8a26a3a325fd16148473d57.tar.gz
nextcloud-server-eec1c4398aeee1cda8a26a3a325fd16148473d57.zip
only unshare user share if it was shared with the current user
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 646405a37b5..172e61c5dc8 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -731,7 +731,8 @@ class Share extends \OC\Share\Constants {
$itemUnshared = false;
foreach ($shares as $share) {
- if ((int)$share['share_type'] === \OCP\Share::SHARE_TYPE_USER) {
+ if ((int)$share['share_type'] === \OCP\Share::SHARE_TYPE_USER &&
+ $share['share_with'] === \OCP\User::getUser()) {
Helper::delete($share['id']);
$itemUnshared = true;
break;