2018-10-22 07:00:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-21 01:40:56 +00:00
|
|
|
module Gitlab
|
|
|
|
module ProtocolAccess
|
|
|
|
def self.allowed?(protocol)
|
2016-06-29 20:25:04 +00:00
|
|
|
if protocol == 'web'
|
2016-06-21 01:40:56 +00:00
|
|
|
true
|
2018-02-02 18:39:55 +00:00
|
|
|
elsif Gitlab::CurrentSettings.enabled_git_access_protocol.blank?
|
2016-06-21 01:40:56 +00:00
|
|
|
true
|
|
|
|
else
|
2018-02-02 18:39:55 +00:00
|
|
|
protocol == Gitlab::CurrentSettings.enabled_git_access_protocol
|
2016-06-21 01:40:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|