BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1018ab05
Commit
1018ab05
authored
Aug 03, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm-api-current-user' into 'master'
Do not validate CSRF token in API unless needed Closes #35705 See merge request !13256
parents
f105a857
14644d40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
api.rb
lib/api/api.rb
+1
-1
helpers.rb
lib/api/helpers.rb
+2
-0
No files found.
lib/api/api.rb
View file @
1018ab05
...
...
@@ -48,8 +48,8 @@ module API
end
before
{
header
[
'X-Frame-Options'
]
=
'SAMEORIGIN'
}
before
{
Gitlab
::
I18n
.
locale
=
current_user
&
.
preferred_language
}
# The locale is set to the current user's locale when `current_user` is loaded
after
{
Gitlab
::
I18n
.
use_default_locale
}
rescue_from
Gitlab
::
Access
::
AccessDeniedError
do
...
...
lib/api/helpers.rb
View file @
1018ab05
...
...
@@ -16,6 +16,8 @@ module API
@current_user
=
initial_current_user
Gitlab
::
I18n
.
locale
=
@current_user
&
.
preferred_language
sudo!
@current_user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment