diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-03-01 11:46:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 11:46:30 +0100 |
commit | 416efc12d6a0e535468082dfb9f88c17b7050236 (patch) | |
tree | efa1be8652055d72e773cd3b7de942bd2741a094 /core | |
parent | 7145d8a8920470bb2927f494534a9d45f4279dee (diff) | |
parent | a0ecc37d036ace7bd32675f89b046bf0bff1fe89 (diff) | |
download | nextcloud-server-416efc12d6a0e535468082dfb9f88c17b7050236.tar.gz nextcloud-server-416efc12d6a0e535468082dfb9f88c17b7050236.zip |
Merge pull request #36890 from nextcloud/bugfix/noid/translation-api-annotation
fix(translation): Allow regular users to use translation api endpoints
Diffstat (limited to 'core')
-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([ |