summaryrefslogtreecommitdiff
path: root/lib/gitlab/protocol_access.rb
blob: 2819c7d062cbec9a7c28c58b7e2029b1a0dd8391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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