From 35b083449a02bd7bdc04e82847a045c4a0d9c9af Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 13 Apr 2023 09:01:27 +0200 Subject: [PATCH] feat(translation): Allow guests to use translations as well Signed-off-by: Joas Schilling --- core/Controller/TranslationApiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/Controller/TranslationApiController.php b/core/Controller/TranslationApiController.php index c8077987cb8..a09f7e6aba9 100644 --- a/core/Controller/TranslationApiController.php +++ b/core/Controller/TranslationApiController.php @@ -52,7 +52,7 @@ class TranslationApiController extends \OCP\AppFramework\OCSController { } /** - * @NoAdminRequired + * @PublicPage */ public function languages(): DataResponse { return new DataResponse([ @@ -62,7 +62,9 @@ class TranslationApiController extends \OCP\AppFramework\OCSController { } /** - * @NoAdminRequired + * @PublicPage + * @UserRateThrottle(limit=25, period=120) + * @AnonRateThrottle(limit=10, period=120) */ public function translate(string $text, ?string $fromLanguage, string $toLanguage): DataResponse { try {