From 0aa9500c953301049d8610ad4d3ba20bd16be8bd Mon Sep 17 00:00:00 2001 From: Dariusz Olszewski Date: Sat, 5 Nov 2022 13:05:26 +0100 Subject: [PATCH] Fix permissions returned by getSharesInFolder Signed-off-by: Dariusz Olszewski --- lib/Share/RoomShareProvider.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Share/RoomShareProvider.php b/lib/Share/RoomShareProvider.php index 49f5c985d9d..a1ad3b2d0d9 100644 --- a/lib/Share/RoomShareProvider.php +++ b/lib/Share/RoomShareProvider.php @@ -546,7 +546,11 @@ public function move(IShare $share, $recipient): IShare { */ public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true): array { $qb = $this->dbConnection->getQueryBuilder(); - $qb->select('*') + $qb->select('s.*', + 'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage', 'f.path_hash', + 'f.parent AS f_parent', 'f.name', 'f.mimetype', 'f.mimepart', 'f.size', 'f.mtime', 'f.storage_mtime', + 'f.encrypted', 'f.unencrypted_size', 'f.etag', 'f.checksum' + ) ->from('share', 's') ->andWhere($qb->expr()->orX( $qb->expr()->eq('s.item_type', $qb->createNamedParameter('file')),