debian-mirror-gitlab/lib/gitlab/protocol_access.rb
2018-03-17 18:26:18 +05:30

14 lines
305 B
Ruby

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