only unshare user share if it was shared with the current user

This commit is contained in:
Bjoern Schiessle 2014-06-04 19:45:10 +02:00 zatwierdzone przez Robin Appelman
rodzic 5bbfdc35d7
commit eec1c4398a

Wyświetl plik

@ -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;