Skip to content

Commit 903258d

Browse files
author
Carl Schwan
committed
perf: Use getBoard to get the board
So that this can benefit from a local cache
1 parent 1727a83 commit 903258d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Service/PermissionService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function findUsers($boardId, $refresh = false) {
214214
}
215215

216216
try {
217-
$board = $this->boardMapper->find($boardId);
217+
$board = $this->getBoard($boardId);
218218
} catch (DoesNotExistException $e) {
219219
return [];
220220
} catch (MultipleObjectsReturnedException $e) {
@@ -227,7 +227,7 @@ public function findUsers($boardId, $refresh = false) {
227227
} else {
228228
$users[$board->getOwner()] = new User($board->getOwner(), $this->userManager);
229229
}
230-
$acls = $this->aclMapper->findAll($boardId);
230+
$acls = $board->getAcl();
231231
/** @var Acl $acl */
232232
foreach ($acls as $acl) {
233233
if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {

0 commit comments

Comments
 (0)