Commit ae532fdf authored by Alex Kalderimis's avatar Alex Kalderimis

Move methods out of prepend block

parent 89a340bf
...@@ -126,35 +126,35 @@ module EE ...@@ -126,35 +126,35 @@ module EE
null: true, null: true,
description: 'Incident Management On-call schedules of the project', description: 'Incident Management On-call schedules of the project',
resolver: ::Resolvers::IncidentManagement::OncallScheduleResolver resolver: ::Resolvers::IncidentManagement::OncallScheduleResolver
end
def dast_scanner_profiles def dast_scanner_profiles
DastScannerProfilesFinder.new(project_ids: [object.id]).execute DastScannerProfilesFinder.new(project_ids: [object.id]).execute
end end
def requirement_states_count def requirement_states_count
return unless Ability.allowed?(current_user, :read_requirement, object) return unless Ability.allowed?(current_user, :read_requirement, object)
Hash.new(0).merge(object.requirements.counts_by_state) Hash.new(0).merge(object.requirements.counts_by_state)
end end
def sast_ci_configuration def sast_ci_configuration
return unless Ability.allowed?(current_user, :download_code, object) return unless Ability.allowed?(current_user, :download_code, object)
::Security::CiConfiguration::SastParserService.new(object).configuration ::Security::CiConfiguration::SastParserService.new(object).configuration
end end
def security_dashboard_path def security_dashboard_path
Rails.application.routes.url_helpers.project_security_dashboard_index_path(object) Rails.application.routes.url_helpers.project_security_dashboard_index_path(object)
end end
def compliance_frameworks def compliance_frameworks
BatchLoader::GraphQL.for(object.id).batch(default_value: []) do |project_ids, loader| BatchLoader::GraphQL.for(object.id).batch(default_value: []) do |project_ids, loader|
results = ::ComplianceManagement::Framework.with_projects(project_ids) results = ::ComplianceManagement::Framework.with_projects(project_ids)
results.each do |framework| results.each do |framework|
framework.project_ids.each do |project_id| framework.project_ids.each do |project_id|
loader.call(project_id) { |xs| xs << framework } loader.call(project_id) { |xs| xs << framework }
end
end end
end end
end end
......
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