Skip to content

Commit

Permalink
fix: catch some acl errors when listing trashbin
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Feb 7, 2025
1 parent 58ee0c9 commit 2225f56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,13 @@ private function userHasAccessToPath(
string $path,
int $permission = Constants::PERMISSION_READ,
): bool {
$activePermissions = $this->aclManagerFactory->getACLManager($user)
->getACLPermissionsForPath($path);
try {
$activePermissions = $this->aclManagerFactory->getACLManager($user)
->getACLPermissionsForPath($path);
} catch (\Exception $e) {
$this->logger->warning("Failed to get permissions for {$path}", ['exception' => $e]);
return false;
}

return (bool)($activePermissions & $permission);
}
Expand Down

0 comments on commit 2225f56

Please sign in to comment.