gitlab-org--gitlab-foss/lib/gitlab/protocol_access.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
336 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module ProtocolAccess
def self.allowed?(protocol)
2016-06-29 16:25:04 -04:00
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