@@ 512-523 (lines=12) @@ | ||
509 | * @throws ShareNotFound |
|
510 | * @throws \OC\HintException |
|
511 | */ |
|
512 | protected function revokeShare($share, $isOwner) { |
|
513 | // also send a unShare request to the initiator, if this is a different user than the owner |
|
514 | if ($share->getShareOwner() !== $share->getSharedBy()) { |
|
515 | if ($isOwner) { |
|
516 | list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
|
517 | } else { |
|
518 | list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
|
519 | } |
|
520 | $remoteId = $this->getRemoteId($share); |
|
521 | $this->notifications->sendRevokeShare($remote, $remoteId, $share->getToken()); |
|
522 | } |
|
523 | } |
|
524 | ||
525 | /** |
|
526 | * remove share from table |
|
@@ 369-378 (lines=10) @@ | ||
366 | * @throws ShareNotFound |
|
367 | * @throws \OC\HintException |
|
368 | */ |
|
369 | protected function sendPermissionUpdate(IShare $share) { |
|
370 | $remoteId = $this->getRemoteId($share); |
|
371 | // if the local user is the owner we send the permission change to the initiator |
|
372 | if ($this->userManager->userExists($share->getShareOwner())) { |
|
373 | list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); |
|
374 | } else { // ... if not we send the permission change to the owner |
|
375 | list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); |
|
376 | } |
|
377 | $this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions()); |
|
378 | } |
|
379 | ||
380 | /** |
|
381 | * update successful reShare with the correct token |