diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 15:08:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 15:08:33 +0000 |
commit | 511e761b41b81484c85e3d125f45873ce38e9201 (patch) | |
tree | 6bb98a6356de6e1d736951d2eef6ec83e6aa3dd2 /lib/api/api.rb | |
parent | 4247e67be1faa9d52691757dad954a7fa63e8bfe (diff) | |
download | gitlab-ce-511e761b41b81484c85e3d125f45873ce38e9201.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 56eccb036b6..eae10738f32 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -43,6 +43,14 @@ module API header['X-Content-Type-Options'] = 'nosniff' end + before do + Gitlab::ApplicationContext.push( + user: -> { current_user }, + project: -> { @project }, + namespace: -> { @group } + ) + end + # The locale is set to the current user's locale when `current_user` is loaded after { Gitlab::I18n.use_default_locale } |