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
iv
gitlab-ce
Commits
ace309d7
Commit
ace309d7
authored
Jun 23, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise an error if no protocol is passed to the GitAccess check.
parent
42fb2516
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/gitlab/git/hook.rb
lib/gitlab/git/hook.rb
+2
-1
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+1
-1
No files found.
lib/gitlab/git/hook.rb
View file @
ace309d7
module
Gitlab
module
Git
class
Hook
GL_PROTOCOL
=
'web'
.
freeze
attr_reader
:name
,
:repo_path
,
:path
def
initialize
(
name
,
repo_path
)
...
...
@@ -35,7 +36,7 @@ module Gitlab
vars
=
{
'GL_ID'
=>
gl_id
,
'PWD'
=>
repo_path
,
'GL_PROTOCOL'
=>
'web'
'GL_PROTOCOL'
=>
GL_PROTOCOL
}
options
=
{
...
...
lib/gitlab/git_access.rb
View file @
ace309d7
...
...
@@ -50,7 +50,7 @@ module Gitlab
end
def
check
(
cmd
,
changes
=
nil
)
r
eturn
build_status_object
(
false
,
'Access denied due to unspecified Git access protocol'
)
unless
protocol
r
aise
'Access denied due to unspecified Git access protocol'
unless
protocol
return
build_status_object
(
false
,
"Git access over
#{
protocol
.
upcase
}
is not allowed"
)
unless
protocol_allowed?
...
...
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