diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-13 09:01:27 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-13 09:09:44 +0200 |
commit | 35b083449a02bd7bdc04e82847a045c4a0d9c9af (patch) | |
tree | 3ba86eb1576333f2c2b2903e975a3c32db72dae0 | |
parent | 5a502c6973bc35fb72b20332ad3682c4c3b58180 (diff) | |
download | nextcloud-server-35b083449a02bd7bdc04e82847a045c4a0d9c9af.tar.gz nextcloud-server-35b083449a02bd7bdc04e82847a045c4a0d9c9af.zip |
feat(translation): Allow guests to use translations as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | core/Controller/TranslationApiController.php | 6 |
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 { |