Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: only fetch acl status once
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and SystemKeeper committed Apr 18, 2025
commit 8674827437cccfe6591b7bd1bdada716532eaa1d
7 changes: 6 additions & 1 deletion lib/FilesHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,8 @@ private function getUnrelatedUsers(int $fileId, array $cachedMounts): array {
return []; // if we have no access to RuleManager, we cannot filter unrelated users
}

$groupFolderAclStatus = [];

/** @var \OCA\GroupFolders\ACL\Rule[] $rules */
$rules = $knownRules = $knownGroupRules = $usersToCheck = $cachedPath = [];
foreach ($cachedMounts as $cachedMount) {
Expand All @@ -1309,7 +1311,10 @@ private function getUnrelatedUsers(int $fileId, array $cachedMounts): array {
}

$folderId = (int)basename($cachedMount['rootInternalPath']);
if (!$folderManager->getFolderAclEnabled($folderId)) {
if (!isset($groupFolderAclStatus[$folderId])) {
$groupFolderAclStatus[$folderId] = $folderManager->getFolderAclEnabled($folderId);
}
if (!$groupFolderAclStatus[$folderId]) {
continue; // acl are disable
}

Expand Down
Loading