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
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with
5 additions and
3 deletions
-
apps/files_reminders/lib/Dav/PropFindPlugin.php
-
apps/files_reminders/lib/Service/ReminderService.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 ''; |
|
|
|
} |
|
|
|
|
|
@ -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) { |
|
|
|