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

16 lines
351 B
Ruby
Raw Normal View History

module Gitlab
module ProtocolAccess
extend Gitlab::CurrentSettings
def self.allowed?(protocol)
2016-06-29 16:25:04 -04:00
if protocol == 'web'
true
elsif current_application_settings.enabled_git_access_protocol.blank?
true
else
2016-06-29 16:25:04 -04:00
protocol == current_application_settings.enabled_git_access_protocol
end
end
end
end