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
eb970f8f
Commit
eb970f8f
authored
Sep 08, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Allow upload_code ability for auth'd Geo request
parent
c48ad0fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
35 deletions
+14
-35
ee/lib/ee/gitlab/git_access.rb
ee/lib/ee/gitlab/git_access.rb
+0
-5
ee/spec/requests/git_http_geo_spec.rb
ee/spec/requests/git_http_geo_spec.rb
+14
-30
No files found.
ee/lib/ee/gitlab/git_access.rb
View file @
eb970f8f
...
...
@@ -52,11 +52,6 @@ module EE
def
geo?
actor
==
:geo
end
override
:authed_via_jwt?
def
authed_via_jwt?
geo?
end
end
end
end
ee/spec/requests/git_http_geo_spec.rb
View file @
eb970f8f
...
...
@@ -278,37 +278,18 @@ describe "Git HTTP requests (Geo)" do
response
end
context
'when gl_id is not correctly provided via HTTP headers'
do
context
"as it's empty"
do
where
(
:geo_gl_id
)
do
[
nil
,
''
]
end
with_them
do
it
'returns a 403'
do
is_expected
.
to
have_gitlab_http_status
(
:forbidden
)
expect
(
response
.
body
).
to
eql
(
'You are not allowed to push code to this project.'
)
end
end
context
'when gl_id is incorrectly provided via HTTP headers'
do
where
(
:geo_gl_id
)
do
[
nil
,
''
]
end
context
"as it's junk"
do
where
(
:geo_gl_id
)
do
[
'junk'
,
'junk-1'
,
'kkey-1'
]
end
with_them
do
it
'returns a 403'
do
is_expected
.
to
have_gitlab_http_status
(
:forbidden
)
expect
(
response
.
body
).
to
eql
(
'Geo push user is invalid.'
)
end
with_them
do
it
'returns a 403'
do
is_expected
.
to
have_gitlab_http_status
(
:forbidden
)
expect
(
response
.
body
).
to
eql
(
'You are not allowed to upload code for this project.'
)
end
end
end
...
...
@@ -319,7 +300,10 @@ describe "Git HTTP requests (Geo)" do
[
'key-999'
,
'key-1'
,
'key-999'
'key-999'
,
'junk'
,
'junk-1'
,
'kkey-1'
]
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