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

14 lines
315 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 current_application_settings.enabled_git_access_protocol.blank?
true
else
2016-06-29 20:25:04 +00:00
protocol == current_application_settings.enabled_git_access_protocol
end
end
end
end