2019-07-04 11:18:33 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module CycleAnalytics
|
|
|
|
class ProjectLevel < Base
|
2019-07-08 08:26:02 +00:00
|
|
|
def initialize(project, options:)
|
2019-07-04 11:18:33 +00:00
|
|
|
@project = project
|
|
|
|
@options = options
|
|
|
|
end
|
|
|
|
|
|
|
|
def summary
|
|
|
|
@summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(@project,
|
|
|
|
from: @options[:from],
|
|
|
|
current_user: @options[:current_user]).data
|
|
|
|
end
|
|
|
|
|
|
|
|
def permissions(user:)
|
|
|
|
Gitlab::CycleAnalytics::Permissions.get(user: user, project: @project)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|