summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-08-02 18:20:31 +0200
committerDouwe Maan <douwe@selenight.nl>2017-08-02 18:20:31 +0200
commit14644d40e0852403ba71435bf3a949af00a7d569 (patch)
treeb5f61f5233cbcfa76d5810a11ff5b9423a0c14b6 /lib/api/helpers.rb
parent6fe736f2c927340ed8cf827080db781f7c8adcdf (diff)
downloadgitlab-ce-dm-api-current-user.tar.gz
Do not validate CSRF token in API unless neededdm-api-current-user
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 234825480f2..99b8b62691f 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -16,6 +16,8 @@ module API
@current_user = initial_current_user
+ Gitlab::I18n.locale = @current_user&.preferred_language
+
sudo!
@current_user