Commit 00d7fdc5 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Backport changes from EE to minimize the CE/EE diff in Projects::Settings::IntegrationsController


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 55792cc44aa8
......@@ -11,7 +11,14 @@ def show
@hook = ProjectHook.new
# Services
@services = @project.find_or_initialize_services
@services = @project.find_or_initialize_services(exceptions: service_exceptions)
end
private
# Returns a list of services that should be hidden from the list
def service_exceptions
@project.disabled_services.dup
end
end
end
......
......@@ -998,7 +998,7 @@ def find_or_initialize_services(exceptions: [])
available_services_names = Service.available_services_names - exceptions
available_services_names.map do |service_name|
available_services = available_services_names.map do |service_name|
service = find_service(services, service_name)
if service
......@@ -1015,6 +1015,14 @@ def find_or_initialize_services(exceptions: [])
end
end
end
available_services.reject do |service|
disabled_services.include?(service.to_param)
end
end
def disabled_services
[]
end
def find_or_initialize_service(name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment