Class: Analytics::CycleAnalytics::Stages::ListService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/analytics/cycle_analytics/stages/list_service.rb

Constant Summary

Constants inherited from BaseService

BaseService::DEFAULT_VALUE_STREAM_NAME

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods included from Gitlab::Allowable

#can?, #can_all?, #can_any?

Constructor Details

This class inherits a constructor from Analytics::CycleAnalytics::Stages::BaseService

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
# File 'app/services/analytics/cycle_analytics/stages/list_service.rb', line 7

def execute
  return forbidden unless allowed?

  stages = build_default_stages
  # In FOSS, stages are not persisted, we match them by name
  stages = stages.select { |stage| params[:stage_ids].include?(stage.name) } if filter_by_stage_ids?
  success(stages)
end