diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-10-29 10:03:52 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-11-02 12:09:26 +0100 |
commit | 68c44bb6427632e237792bd75d874be4b4562f3f (patch) | |
tree | d93a96cdbe77ea1249782258c9072bab88b2480a /lib/private/Share20 | |
parent | f13c7dda1cc777e73a4e615d12334276e9b3ec03 (diff) | |
download | nextcloud-server-68c44bb6427632e237792bd75d874be4b4562f3f.tar.gz nextcloud-server-68c44bb6427632e237792bd75d874be4b4562f3f.zip |
shares are displayed to users with resharing rights
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 50111054546..53fd1728b81 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -617,18 +617,18 @@ class DefaultShareProvider implements IShareProvider { /** * Reshares for this user are shares where they are the owner. */ - if ($reshares === false) { - $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId))); + if ($node === null) { + if ($reshares === false) { + $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId))); + } else { + $qb->andWhere( + $qb->expr()->orX( + $qb->expr()->eq('uid_owner', $qb->createNamedParameter($userId)), + $qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)) + ) + ); + } } else { - $qb->andWhere( - $qb->expr()->orX( - $qb->expr()->eq('uid_owner', $qb->createNamedParameter($userId)), - $qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)) - ) - ); - } - - if ($node !== null) { $qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId()))); } |