gitlab-org--gitlab-foss/lib/gitlab/protocol_access.rb
2018-10-22 07:00:50 +00:00

15 lines
336 B
Ruby

# frozen_string_literal: true
module Gitlab
module ProtocolAccess
def self.allowed?(protocol)
if protocol == 'web'
true
elsif Gitlab::CurrentSettings.enabled_git_access_protocol.blank?
true
else
protocol == Gitlab::CurrentSettings.enabled_git_access_protocol
end
end
end
end