From 0d3297db28d49d603a3e8b7b0482efc046ff6a00 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 14 Aug 2023 18:05:14 -0700 Subject: fix(files_reminders): Allow non-admin Signed-off-by: Christopher Ng --- apps/files_reminders/lib/Controller/ApiController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php index 873088177c1..ed23ee032ba 100644 --- a/apps/files_reminders/lib/Controller/ApiController.php +++ b/apps/files_reminders/lib/Controller/ApiController.php @@ -34,6 +34,7 @@ use OCA\FilesReminders\Exception\NodeNotFoundException; use OCA\FilesReminders\Service\ReminderService; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -54,6 +55,7 @@ class ApiController extends OCSController { /** * Get a reminder */ + #[NoAdminRequired] public function get(int $fileId): DataResponse { $user = $this->userSession->getUser(); if ($user === null) { @@ -79,6 +81,7 @@ class ApiController extends OCSController { * * @param string $dueDate ISO 8601 formatted date time string */ + #[NoAdminRequired] public function set(int $fileId, string $dueDate): DataResponse { try { $dueDate = (new DateTime($dueDate))->setTimezone(new DateTimeZone('UTC')); @@ -106,6 +109,7 @@ class ApiController extends OCSController { /** * Remove a reminder */ + #[NoAdminRequired] public function remove(int $fileId): DataResponse { $user = $this->userSession->getUser(); if ($user === null) { -- cgit v1.2.3