Use ShareWith and filter shares on the fly

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-05-06 12:39:52 +02:00
commit e9d84d87f5
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
5 changed files with 28 additions and 32 deletions

View file

@ -216,10 +216,10 @@ class ApiController extends Controller {
try {
if ($keyValuePairs['access']) {
$keyValuePairs['access']['users'] = array_map(function (array $user): string {
return $user['id'];
return $user['shareWith'];
}, $keyValuePairs['access']['users']);
$keyValuePairs['access']['groups'] = array_map(function (array $group): string {
return $group['id'];
return $group['shareWith'];
}, $keyValuePairs['access']['groups']);
}
} catch (Exception $e) {