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

16 lines
336 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
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