|
@@ 391-400 (lines=10) @@
|
| 388 |
|
* @throws ShareNotFound |
| 389 |
|
* @throws \OC\HintException |
| 390 |
|
*/ |
| 391 |
|
protected function sendPermissionUpdate(IShare $share) { |
| 392 |
|
$remoteId = $this->getRemoteId($share); |
| 393 |
|
// if the local user is the owner we send the permission change to the initiator |
| 394 |
|
if ($this->userManager->userExists($share->getShareOwner())) { |
| 395 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
| 396 |
|
} else { // ... if not we send the permission change to the owner |
| 397 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
| 398 |
|
} |
| 399 |
|
$this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions()); |
| 400 |
|
} |
| 401 |
|
|
| 402 |
|
|
| 403 |
|
/** |
|
@@ 536-547 (lines=12) @@
|
| 533 |
|
* @throws ShareNotFound |
| 534 |
|
* @throws \OC\HintException |
| 535 |
|
*/ |
| 536 |
|
protected function revokeShare($share, $isOwner) { |
| 537 |
|
// also send a unShare request to the initiator, if this is a different user than the owner |
| 538 |
|
if ($share->getShareOwner() !== $share->getSharedBy()) { |
| 539 |
|
if ($isOwner) { |
| 540 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
| 541 |
|
} else { |
| 542 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
| 543 |
|
} |
| 544 |
|
$remoteId = $this->getRemoteId($share); |
| 545 |
|
$this->notifications->sendRevokeShare($remote, $remoteId, $share->getToken()); |
| 546 |
|
} |
| 547 |
|
} |
| 548 |
|
|
| 549 |
|
/** |
| 550 |
|
* remove share from table |