summaryrefslogtreecommitdiff
path: root/lib/gitlab/protocol_access.rb
blob: efeb1e07d49330367d8d09d6763d5db0417c9a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module ProtocolAccess
    def self.allowed?(protocol)
      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