BigW Consortium Gitlab

Commit ace309d7 by Patricio Cano

Raise an error if no protocol is passed to the GitAccess check.

parent 42fb2516
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 = {
......
......@@ -50,7 +50,7 @@ module Gitlab
end
def check(cmd, changes = nil)
return build_status_object(false, 'Access denied due to unspecified Git access protocol') unless protocol
raise '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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment