Skip to content

Commit bbf2e7e

Browse files
committed
wip
Signed-off-by: Daniel Kesselberg <[email protected]> # Conflicts: # apps/federatedfilesharing/lib/FederatedShareProvider.php
1 parent 81400d9 commit bbf2e7e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/federatedfilesharing/lib/FederatedShareProvider.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,16 @@ public function update(IShare $share): IShare {
329329
->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATETIME_MUTABLE))
330330
->executeStatement();
331331

332-
// send the updated permission to the owner/initiator, if they are not the same
333-
if ($share->getShareOwner() !== $share->getSharedBy()) {
332+
/*
333+
* If the share owner and share initiator are on the same instance,
334+
* then we're done here as the share was just updated above.
335+
*
336+
* However, if the share owner is on a remote instance (and thus we're dealing with a federated share),
337+
* then we are supposed to let the share owner on the remote instance know.
338+
*/
339+
$ownerIsLocal = $this->userManager->userExists($share->getShareOwner());
340+
341+
if (!$ownerIsLocal) {
334342
$this->sendPermissionUpdate($share);
335343
}
336344

0 commit comments

Comments
 (0)