Merge pull request #16486 from nextcloud/bugfix/16477/get-accesslist

fix(filesintegration): Correctly handle optional values for file inte…
This commit is contained in:
Joas Schilling 2025-12-05 22:44:26 +01:00 committed by GitHub
commit 485193ca5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,6 +45,7 @@ class Util {
$node = array_shift($nodes);
$accessList = $this->shareManager->getAccessList($node);
$accessList['users'] ??= [];
if (!$node->getStorage()->instanceOfStorage(SharedStorage::class)) {
// The file is not a shared file,
// let's check the accesslist for mount points of groupfolders and external storages
@ -76,7 +77,7 @@ class Util {
$node = array_shift($nodes);
$accessList = $this->shareManager->getAccessList($node, false);
$this->publicAccessLists[$fileId] = $accessList['public'];
$this->publicAccessLists[$fileId] = $accessList['public'] ?? false;
}
return $this->publicAccessLists[$fileId] === true;
}