gitlab-org--gitlab-foss/lib/gitlab/protocol_access.rb

14 lines
305 B
Ruby
Raw Normal View History

module Gitlab
module ProtocolAccess
def self.allowed?(protocol)
2016-06-29 20:25:04 +00:00
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