summaryrefslogtreecommitdiff
path: root/lib/gitlab/protocol_access.rb
blob: 836ff8a34bac78ddd42e6fb643e800d30fd15e16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Gitlab
  module ProtocolAccess
    def self.allowed?(protocol)
      if protocol.to_s == 'web'
        true
      elsif current_application_settings.enabled_git_access_protocols.blank?
        true
      else
        protocol.to_s == current_application_settings.enabled_git_access_protocols
      end
    end
  end
end