Module: Gitlab::ProtocolAccess

Defined in:
lib/gitlab/protocol_access.rb

Class Method Summary collapse

Class Method Details

.allowed?(protocol) ⇒ Boolean

Returns:

  • (Boolean)

5
6
7
8
9
10
11
12
13
# File 'lib/gitlab/protocol_access.rb', line 5

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