2016-06-20 21:40:56 -04:00
|
|
|
module Gitlab
|
|
|
|
module ProtocolAccess
|
|
|
|
def self.allowed?(protocol)
|
2016-06-29 16:25:04 -04:00
|
|
|
if protocol == 'web'
|
2016-06-20 21:40:56 -04:00
|
|
|
true
|
2016-06-29 15:30:27 -04:00
|
|
|
elsif current_application_settings.enabled_git_access_protocol.blank?
|
2016-06-20 21:40:56 -04:00
|
|
|
true
|
|
|
|
else
|
2016-06-29 16:25:04 -04:00
|
|
|
protocol == current_application_settings.enabled_git_access_protocol
|
2016-06-20 21:40:56 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|