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

14 lines
305 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
2018-03-17 18:26:18 +05:30
elsif Gitlab::CurrentSettings.enabled_git_access_protocol.blank?
2016-08-24 12:49:21 +05:30
true
else
2018-03-17 18:26:18 +05:30
protocol == Gitlab::CurrentSettings.enabled_git_access_protocol
2016-08-24 12:49:21 +05:30
end
end
end
end