Browse Source

fix: don't check node access again for listing reminders in dav

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/52443/head
Robin Appelman 6 months ago
parent
commit
3d36625af6
No known key found for this signature in database GPG Key ID: 42B69D8A64526EFB
  1. 2
      apps/files_reminders/lib/Dav/PropFindPlugin.php
  2. 6
      apps/files_reminders/lib/Service/ReminderService.php

2
apps/files_reminders/lib/Dav/PropFindPlugin.php

@ -62,7 +62,7 @@ class PropFindPlugin extends ServerPlugin {
}
$fileId = $node->getId();
$reminder = $this->reminderService->getDueForUser($user, $fileId);
$reminder = $this->reminderService->getDueForUser($user, $fileId, false);
if ($reminder === null) {
return '';
}

6
apps/files_reminders/lib/Service/ReminderService.php

@ -64,8 +64,10 @@ class ReminderService {
/**
* @throws NodeNotFoundException
*/
public function getDueForUser(IUser $user, int $fileId): ?RichReminder {
$this->checkNode($user, $fileId);
public function getDueForUser(IUser $user, int $fileId, bool $checkNode = true): ?RichReminder {
if ($checkNode) {
$this->checkNode($user, $fileId);
}
/** @var null|false|Reminder $cachedReminder */
$cachedReminder = $this->cache->get("{$user->getUID()}-$fileId");
if ($cachedReminder === false) {

Loading…
Cancel
Save