Browse Source

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

tags/v7.0.0alpha2
Bjoern Schiessle 10 years ago
parent
commit
eec1c4398a
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      lib/private/share/share.php

+ 2
- 1
lib/private/share/share.php View File

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

Loading…
Cancel
Save