Skip to content
Draft

wip #57667

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions apps/federatedfilesharing/lib/FederatedShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,16 @@ public function update(IShare $share): IShare {
->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATETIME_MUTABLE))
->executeStatement();

// send the updated permission to the owner/initiator, if they are not the same
if ($share->getShareOwner() !== $share->getSharedBy()) {
/*
* If the share owner and share initiator are on the same instance,
* then we're done here as the share was just updated above.
*
* However, if the share owner is on a remote instance (and thus we're dealing with a federated share),
* then we are supposed to let the share owner on the remote instance know.
*/
$ownerIsLocal = $this->userManager->userExists($share->getShareOwner());

if (!$ownerIsLocal) {
$this->sendPermissionUpdate($share);
}

Expand Down
Loading