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
89a2d435
Commit
89a2d435
authored
Jun 29, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We don't need an around_filter
parent
ebb6a075
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
app/controllers/projects/git_http_controller.rb
app/controllers/projects/git_http_controller.rb
+4
-7
No files found.
app/controllers/projects/git_http_controller.rb
View file @
89a2d435
...
...
@@ -7,7 +7,7 @@ class Projects::GitHttpController < Projects::ApplicationController
# Git clients will not know what authenticity token to send along
skip_before_action
:verify_authenticity_token
skip_before_action
:repository
around
_action
:authenticate_user
before
_action
:authenticate_user
before_action
:ensure_project_found!
# GET /foo/bar.git/info/refs?service=git-upload-pack (git pull)
...
...
@@ -44,8 +44,7 @@ class Projects::GitHttpController < Projects::ApplicationController
def
authenticate_user
if
project
&&
project
.
public?
&&
upload_pack?
yield
return
return
# Allow access
end
if
allow_basic_auth?
&&
has_basic_credentials?
(
request
)
...
...
@@ -61,8 +60,7 @@ class Projects::GitHttpController < Projects::ApplicationController
end
if
ci?
||
user
yield
return
return
# Allow access
end
elsif
allow_kerberos_spnego_auth?
&&
has_spnego_credentials?
(
request
)
spnego_token
=
Base64
.
strict_decode64
(
auth_param
(
request
))
...
...
@@ -70,8 +68,7 @@ class Projects::GitHttpController < Projects::ApplicationController
if
user
set_www_authenticate
(
spnego_challenge
)
if
spnego_response_token
yield
return
return
# Allow access
end
end
...
...
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