diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-08-14 18:05:14 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-08-14 18:05:14 -0700 |
commit | 0d3297db28d49d603a3e8b7b0482efc046ff6a00 (patch) | |
tree | 8761f255609088f9ace297fa6ea9236e3aa8f310 | |
parent | 2b7d03778fb47908174a3a2f380278addc98cae5 (diff) | |
download | nextcloud-server-0d3297db28d49d603a3e8b7b0482efc046ff6a00.tar.gz nextcloud-server-0d3297db28d49d603a3e8b7b0482efc046ff6a00.zip |
fix(files_reminders): Allow non-admin
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | apps/files_reminders/lib/Controller/ApiController.php | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |