perf: Use getBoard to get the board

So that this can benefit from a local cache

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
This commit is contained in:
Carl Schwan
2025-08-13 13:34:03 +02:00
parent ce81c89b03
commit 8ebeeaa755
2 changed files with 4 additions and 5 deletions

View File

@@ -214,7 +214,7 @@ class PermissionService {
}
try {
$board = $this->boardMapper->find($boardId);
$board = $this->getBoard($boardId);
} catch (DoesNotExistException $e) {
return [];
} catch (MultipleObjectsReturnedException $e) {
@@ -227,7 +227,7 @@ class PermissionService {
} else {
$users[$board->getOwner()] = new User($board->getOwner(), $this->userManager);
}
$acls = $this->aclMapper->findAll($boardId);
$acls = $board->getAcl();
/** @var Acl $acl */
foreach ($acls as $acl) {
if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {