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