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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
97058207
Commit
97058207
authored
Dec 02, 2018
by
mortyccp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint error
parent
d1fea99d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/middleware/go.rb
lib/gitlab/middleware/go.rb
+5
-2
No files found.
lib/gitlab/middleware/go.rb
View file @
97058207
...
...
@@ -132,13 +132,16 @@ module Gitlab
def
current_user_from_basic_authentication?
(
request
,
project
)
return
unless
has_basic_credentials?
(
request
)
login
,
password
=
user_name_and_password
(
request
)
auth_result
=
Gitlab
::
Auth
.
find_for_git_client
(
login
,
password
,
project:
project
,
ip:
request
.
ip
)
return
unless
auth_result
.
success?
return
unless
auth_result
.
actor
&
.
can?
(
:access_api
)
if
auth_result
.
type
==
:personal_access_token
api
ScopeA
bilities
=
Gitlab
::
Auth
.
abilities_for_scopes
([
:api
])
return
unless
auth_result
.
authentication_abilities
.
sort
==
api
ScopeA
bilities
.
sort
api
_sceope_a
bilities
=
Gitlab
::
Auth
.
abilities_for_scopes
([
:api
])
return
unless
auth_result
.
authentication_abilities
.
sort
==
api
_sceope_a
bilities
.
sort
end
auth_result
.
actor
...
...
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