aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-07 15:36:53 +0200
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-10-15 14:36:40 +0200
commit5f903bb6ec50c99187e721607041046f129f1c0f (patch)
tree663bc97d6585108b9f24ecd120ceaac7657c0a43 /apps/sharebymail/lib
parent47acfa04d96ebf048dc75d51cad0a87f5890c9ef (diff)
downloadnextcloud-server-5f903bb6ec50c99187e721607041046f129f1c0f.tar.gz
nextcloud-server-5f903bb6ec50c99187e721607041046f129f1c0f.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>
Diffstat (limited to 'apps/sharebymail/lib')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 60b7f20b88d..1b16948ccc4 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -673,11 +673,14 @@ class ShareByMailProvider implements IShareProvider {
}
/*
- * 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()))