Merge pull request #17419 from nextcloud/backport/17387/stable16

[stable16] Allow removing federated shares of locally reshared files
This commit is contained in:
Roeland Jago Douma 2019-10-07 09:43:32 +02:00 committed by GitHub
commit f09d1d6dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -563,6 +563,11 @@ class FederatedShareProvider implements IShareProvider {
* @throws \OC\HintException
*/
protected function revokeShare($share, $isOwner) {
if ($this->userManager->userExists($share->getShareOwner() && $this->userManager->userExists($share->getSharedBy()))) {
// If both the owner and the initiator of the share are local users we don't have to notify anybody else
return;
}
// also send a unShare request to the initiator, if this is a different user than the owner
if ($share->getShareOwner() !== $share->getSharedBy()) {
if ($isOwner) {