diff options
author | Adam Serbinski <adam@serbinski.com> | 2023-01-26 10:19:54 -0500 |
---|---|---|
committer | Adam Serbinski <37986043+ASerbinski@users.noreply.github.com> | 2024-03-21 18:25:31 -0400 |
commit | 01e32340af1d01ace001e2f3c39f16d9f6cccd6d (patch) | |
tree | df915f32da5c135bb0e8a121c77691b8b64e5179 /apps | |
parent | 34ca6bd46ad926e23280d46f1591c60119724875 (diff) | |
download | nextcloud-server-01e32340af1d01ace001e2f3c39f16d9f6cccd6d.tar.gz nextcloud-server-01e32340af1d01ace001e2f3c39f16d9f6cccd6d.zip |
ShareByMailProvider: getAccessList: set both array keys 'public' and 'mail'
To preserve prior behaviour where 'public' was set 'true' if there
are any mail recipients. The 'mail' key will be an array of email
recipients.
Signed-off-by: Adam Serbinski <adam@serbinski.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/sharebymail/lib/ShareByMailProvider.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 3704de4309f..e7f1db25a9b 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -1108,6 +1108,7 @@ class ShareByMailProvider implements IShareProvider { )); $cursor = $qb->executeQuery(); + $public = $cursor->rowCount() > 0; $mail = []; while ($row = $cursor->fetch()) { if ($currentAccess === false) { @@ -1121,7 +1122,7 @@ class ShareByMailProvider implements IShareProvider { } $cursor->closeCursor(); - return ['public' => $mail]; + return ['public' => $public, 'mail' => $mail]; } public function getAllShares(): iterable { |