Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1a115cec
Commit
1a115cec
authored
Nov 14, 2013
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure private_token for API is a string
parent
36dc6e6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lib/api/helpers.rb
lib/api/helpers.rb
+2
-1
No files found.
lib/api/helpers.rb
View file @
1a115cec
module
API
module
APIHelpers
def
current_user
@current_user
||=
User
.
find_by_authentication_token
(
params
[
:private_token
]
||
env
[
"HTTP_PRIVATE_TOKEN"
])
private_token
=
(
params
[
:private_token
]
||
env
[
"HTTP_PRIVATE_TOKEN"
]).
to_s
@current_user
||=
User
.
find_by_authentication_token
(
private_token
)
end
def
user_project
...
...
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