Skip to content

Commit

Permalink
Merge pull request #6646 from nextcloud/fix/6516
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Jan 9, 2025
2 parents 0c71403 + a35489b commit 0f593ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Service/PermissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ public function checkPermission(?IPermissionMapper $mapper, $id, int $permission
if ($permissions[$permission] === true) {

if (!$allowDeletedCard && $mapper instanceof CardMapper) {
$card = $mapper->find((int)$id, false);
try {
$card = $mapper->find((int)$id, false);
} catch (DoesNotExistException $e) {
throw new NoPermissionException('Permission denied');
}
if ($card->getDeletedAt() > 0) {
throw new NoPermissionException('Card is deleted');
}
Expand Down

0 comments on commit 0f593ed

Please sign in to comment.