gitlab-org--gitlab-foss/lib/gitlab/protocol_access.rb
2016-07-05 16:54:22 -05:00

13 lines
315 B
Ruby

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