diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-02-28 09:29:57 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-02-28 09:29:57 +0100 |
commit | a0ecc37d036ace7bd32675f89b046bf0bff1fe89 (patch) | |
tree | 6eba75e0fbf5a430b07e8252184e6d7c3bbe44b4 /core/Controller/TranslationApiController.php | |
parent | a3ab0ce5d5ecb272d959b5c060f8ef066c24ced9 (diff) | |
download | nextcloud-server-a0ecc37d036ace7bd32675f89b046bf0bff1fe89.tar.gz nextcloud-server-a0ecc37d036ace7bd32675f89b046bf0bff1fe89.zip |
fix(translation): Allow regular users to use translation api endpoints
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Controller/TranslationApiController.php')
-rw-r--r-- | core/Controller/TranslationApiController.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Controller/TranslationApiController.php b/core/Controller/TranslationApiController.php index 4927b7a2be5..9cdfbf4a151 100644 --- a/core/Controller/TranslationApiController.php +++ b/core/Controller/TranslationApiController.php @@ -43,6 +43,9 @@ class TranslationApiController extends \OCP\AppFramework\OCSController { $this->translationManager = $translationManager; } + /** + * @NoAdminRequired + */ public function languages(): DataResponse { return new DataResponse([ 'languages' => $this->translationManager->getLanguages(), @@ -50,6 +53,9 @@ class TranslationApiController extends \OCP\AppFramework\OCSController { ]); } + /** + * @NoAdminRequired + */ public function translate(string $text, ?string $fromLanguage, string $toLanguage): DataResponse { try { return new DataResponse([ |