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>
pull/32631/head
Adam Serbinski 1 year ago committed by Adam Serbinski
parent 34ca6bd46a
commit 01e32340af

@ -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 {

Loading…
Cancel
Save