|
@@ 430-439 (lines=10) @@
|
| 427 |
|
* @throws ShareNotFound |
| 428 |
|
* @throws \OC\HintException |
| 429 |
|
*/ |
| 430 |
|
protected function sendPermissionUpdate(IShare $share) { |
| 431 |
|
$remoteId = $this->getRemoteId($share); |
| 432 |
|
// if the local user is the owner we send the permission change to the initiator |
| 433 |
|
if ($this->userManager->userExists($share->getShareOwner())) { |
| 434 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
| 435 |
|
} else { // ... if not we send the permission change to the owner |
| 436 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
| 437 |
|
} |
| 438 |
|
$this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions()); |
| 439 |
|
} |
| 440 |
|
|
| 441 |
|
|
| 442 |
|
/** |
|
@@ 565-576 (lines=12) @@
|
| 562 |
|
* @throws ShareNotFound |
| 563 |
|
* @throws \OC\HintException |
| 564 |
|
*/ |
| 565 |
|
protected function revokeShare($share, $isOwner) { |
| 566 |
|
// also send a unShare request to the initiator, if this is a different user than the owner |
| 567 |
|
if ($share->getShareOwner() !== $share->getSharedBy()) { |
| 568 |
|
if ($isOwner) { |
| 569 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
| 570 |
|
} else { |
| 571 |
|
list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
| 572 |
|
} |
| 573 |
|
$remoteId = $this->getRemoteId($share); |
| 574 |
|
$this->notifications->sendRevokeShare($remote, $remoteId, $share->getToken()); |
| 575 |
|
} |
| 576 |
|
} |
| 577 |
|
|
| 578 |
|
/** |
| 579 |
|
* remove share from table |