perf: Avoid fetching labels and owner details on permission check

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-06-20 08:31:00 +02:00
parent ea4655b24e
commit d4ea088cd2
2 changed files with 7 additions and 5 deletions

View File

@@ -119,7 +119,7 @@ class PermissionService {
if ($permissions[$permission] === true) {
if (!$allowDeletedCard && $mapper instanceof CardMapper) {
$card = $mapper->find((int)$id);
$card = $mapper->find((int)$id, false);
if ($card->getDeletedAt() > 0) {
throw new NoPermissionException('Card is deleted');
}