debian-mirror-gitlab/lib/gitlab/protocol_access.rb
2016-08-24 12:49:21 +05:30

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