diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-07 15:36:53 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-07 15:36:53 +0200 |
commit | 59e4e4bfba4e4b9fede3b743adedce668dcd0110 (patch) | |
tree | b0671559f80901018face0d418533f76bbd5bf56 | |
parent | bcf670e6b568497f4d1b4ddfa8673d4291b9b187 (diff) | |
download | nextcloud-server-59e4e4bfba4e4b9fede3b743adedce668dcd0110.tar.gz nextcloud-server-59e4e4bfba4e4b9fede3b743adedce668dcd0110.zip |
fix(sharebymail): Fix share update when node id changed
This fixes transfering an email share from a user to another one when using
objectstore as primary storage.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/sharebymail/lib/ShareByMailProvider.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index fd43e7c089e..7b8066e6f77 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -739,11 +739,14 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider $shareAttributes = $this->formatShareAttributes($share->getAttributes()); /* - * We allow updating the permissions and password of mail shares + * We allow updating mail shares */ $qb = $this->dbConnection->getQueryBuilder(); $qb->update('share') ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) + ->set('item_source', $qb->createNamedParameter($share->getNode()->getId())) + ->set('file_source', $qb->createNamedParameter($share->getNode()->getId())) + ->set('share_with', $qb->createNamedParameter($share->getSharedWith())) ->set('permissions', $qb->createNamedParameter($share->getPermissions())) ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) |