debian-mirror-gitlab/lib/gitlab/protocol_access.rb

14 lines
315 B
Ruby
Raw Normal View History

2016-08-24 12:49:21 +05:30
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