summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-04-13 09:01:27 +0200
committerJoas Schilling <coding@schilljs.com>2023-04-13 09:02:46 +0200
commite5d0ff0c19c7806129057856133c7183973882b5 (patch)
tree52c73f887ea3866b5e1a4a402982594f44d65535 /core/Controller
parent032821d2b530f51b9ae5ae51f27c07e6badb3056 (diff)
downloadnextcloud-server-e5d0ff0c19c7806129057856133c7183973882b5.tar.gz
nextcloud-server-e5d0ff0c19c7806129057856133c7183973882b5.zip
feat(translation): Allow guests to use translations as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/TranslationApiController.php6
1 files 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 {