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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
242e77e0
Commit
242e77e0
authored
Sep 20, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use early return in lfs_token_check
parent
dba227da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
lib/gitlab/auth.rb
lib/gitlab/auth.rb
+10
-10
No files found.
lib/gitlab/auth.rb
View file @
242e77e0
...
@@ -113,7 +113,8 @@ module Gitlab
...
@@ -113,7 +113,8 @@ module Gitlab
User
.
by_login
(
login
)
User
.
by_login
(
login
)
end
end
if
actor
return
unless
actor
token_handler
=
Gitlab
::
LfsToken
.
new
(
actor
)
token_handler
=
Gitlab
::
LfsToken
.
new
(
actor
)
authentication_abilities
=
authentication_abilities
=
...
@@ -125,7 +126,6 @@ module Gitlab
...
@@ -125,7 +126,6 @@ module Gitlab
Result
.
new
(
actor
,
nil
,
token_handler
.
type
,
authentication_abilities
)
if
Devise
.
secure_compare
(
token_handler
.
value
,
password
)
Result
.
new
(
actor
,
nil
,
token_handler
.
type
,
authentication_abilities
)
if
Devise
.
secure_compare
(
token_handler
.
value
,
password
)
end
end
end
def
build_access_token_check
(
login
,
password
)
def
build_access_token_check
(
login
,
password
)
return
unless
login
==
'gitlab-ci-token'
return
unless
login
==
'gitlab-ci-token'
...
...
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