Welcome to mirror list, hosted at ThFree Co, Russian Federation.

protocol_access.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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